mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 01:08:48 +00:00
LibWeb: Make XMLSerializer GC-allocated
This commit is contained in:
parent
6b7a1d13e9
commit
233208b640
Notes:
sideshowbarker
2024-07-17 17:49:11 +09:00
Author: https://github.com/awesomekling
Commit: 233208b640
Pull-request: https://github.com/SerenityOS/serenity/pull/14816
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg ✅
4 changed files with 21 additions and 16 deletions
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/XMLSerializerPrototype.h>
|
||||
#include <LibWeb/DOM/CDATASection.h>
|
||||
#include <LibWeb/DOM/Comment.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
|
@ -20,7 +21,17 @@
|
|||
|
||||
namespace Web::DOMParsing {
|
||||
|
||||
XMLSerializer::XMLSerializer() = default;
|
||||
JS::NonnullGCPtr<XMLSerializer> XMLSerializer::create_with_global_object(HTML::Window& window)
|
||||
{
|
||||
return *window.heap().allocate<XMLSerializer>(window.realm(), window);
|
||||
}
|
||||
|
||||
XMLSerializer::XMLSerializer(HTML::Window& window)
|
||||
: PlatformObject(window.realm())
|
||||
{
|
||||
set_prototype(&window.ensure_web_prototype<Bindings::XMLSerializerPrototype>("XMLSerializer"));
|
||||
}
|
||||
|
||||
XMLSerializer::~XMLSerializer() = default;
|
||||
|
||||
// https://w3c.github.io/DOM-Parsing/#dom-xmlserializer-serializetostring
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue