mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 06:18:59 +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
Notes:
sideshowbarker
2024-07-19 01:47:41 +09:00
Author: https://github.com/awesomekling
Commit: 46c15276e9
7 changed files with 11 additions and 9 deletions
|
@ -118,7 +118,7 @@ RefPtr<DOM::Document> parse_html_document(const StringView& data, const URL& url
|
|||
HTMLDocumentParser::HTMLDocumentParser(const StringView& input, const String& encoding)
|
||||
: m_tokenizer(input, encoding)
|
||||
{
|
||||
m_document = adopt(*new DOM::Document);
|
||||
m_document = DOM::Document::create();
|
||||
}
|
||||
|
||||
HTMLDocumentParser::HTMLDocumentParser(const StringView& input, const String& encoding, DOM::Document& existing_document)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue