Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: Source/core/html/parser/HTMLDocumentParser.cpp

Issue 298863010: Oilpan: have PendingScripts trace their script elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add PendingScript::m_element comment + GC plugin annotation. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/parser/HTMLDocumentParser.cpp
diff --git a/Source/core/html/parser/HTMLDocumentParser.cpp b/Source/core/html/parser/HTMLDocumentParser.cpp
index 20f5c4f44d18ec3e9105989a5f2161a94f952af2..d9d3af0fa40c1bddbe5609087120fa884bd50279 100644
--- a/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -161,6 +161,15 @@ HTMLDocumentParser::~HTMLDocumentParser()
void HTMLDocumentParser::trace(Visitor* visitor)
{
visitor->trace(m_treeBuilder);
+ // FIXME: Oilpan: m_scriptRunner is a traced OwnPtr. This is done
+ // so as to allow its destructor to refer to its 'host' (this
+ // HTMLDocumentParser object) when tidying up. Determine if there
+ // is a way to put HTMLScriptRunner on the heap while taking care
+ // of its finalization. It cannot be a part object, as
+ // m_scriptRunner isn't set for DocumentFragment parsing.
+ //
+ // See PendingScript::trace() comment for more background.
+ visitor->trace(m_scriptRunner);
ScriptableDocumentParser::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698