mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
LibWeb: Fix Document construction mishap in <template> element
Ref-counted objects must not be stack allocated. Make DOM::Document's constructor private to avoid this issue. (I wish we could mark classes as heap-only..)
This commit is contained in:
parent
691b105885
commit
46c15276e9
7 changed files with 11 additions and 9 deletions
|
@ -47,7 +47,7 @@ ConsoleWidget::ConsoleWidget()
|
|||
set_layout<GUI::VerticalBoxLayout>();
|
||||
set_fill_with_background_color(true);
|
||||
|
||||
auto base_document = adopt(*new Web::DOM::Document);
|
||||
auto base_document = Web::DOM::Document::create();
|
||||
base_document->append_child(adopt(*new Web::DOM::DocumentType(base_document)));
|
||||
auto html_element = base_document->create_element("html");
|
||||
base_document->append_child(html_element);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue