mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 10:40:39 +09:00
LibWeb: Make DOMStringMap GC-allocated
This commit is contained in:
parent
72bacba97b
commit
ae11d70b0c
Notes:
sideshowbarker
2024-07-17 07:28:55 +09:00
Author: https://github.com/awesomekling
Commit: ae11d70b0c
Pull-request: https://github.com/SerenityOS/serenity/pull/14816
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg ✅
8 changed files with 35 additions and 25 deletions
|
@ -5,13 +5,23 @@
|
|||
*/
|
||||
|
||||
#include <AK/CharacterTypes.h>
|
||||
#include <LibWeb/Bindings/DOMStringMapPrototype.h>
|
||||
#include <LibWeb/Bindings/WindowObject.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/HTML/DOMStringMap.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
DOMStringMap::DOMStringMap(DOM::Element& associated_element)
|
||||
: m_associated_element(associated_element)
|
||||
DOMStringMap* DOMStringMap::create(DOM::Element& element)
|
||||
{
|
||||
auto& realm = element.document().preferred_window_object().realm();
|
||||
return realm.heap().allocate<DOMStringMap>(realm, element);
|
||||
}
|
||||
|
||||
DOMStringMap::DOMStringMap(DOM::Element& element)
|
||||
: PlatformObject(element.document().preferred_window_object().ensure_web_prototype<Bindings::DOMStringMapPrototype>("DOMStringMap"))
|
||||
, m_associated_element(element)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue