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

Unified Diff: Source/core/html/parser/HTMLScriptRunner.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/HTMLScriptRunner.cpp
diff --git a/Source/core/html/parser/HTMLScriptRunner.cpp b/Source/core/html/parser/HTMLScriptRunner.cpp
index 91e008b4ca370d5714c448ded81c215f60c1d77e..4713e575efedb0f622dfe92139886590491fac5e 100644
--- a/Source/core/html/parser/HTMLScriptRunner.cpp
+++ b/Source/core/html/parser/HTMLScriptRunner.cpp
@@ -142,7 +142,7 @@ void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript& pendi
}
// Clear the pending script before possible rentrancy from executeScript()
- RefPtr<Element> element = pendingScript.releaseElementAndClear();
+ RefPtrWillBeRawPtr<Element> element = pendingScript.releaseElementAndClear();
if (ScriptLoader* scriptLoader = toScriptLoaderIfPossible(element.get())) {
NestingLevelIncrementer nestingLevelIncrementer(m_scriptNestingLevel);
IgnoreDestructiveWriteCountIncrementer ignoreDestructiveWriteCountIncrementer(m_document);
@@ -174,7 +174,7 @@ void HTMLScriptRunner::stopWatchingForLoad(PendingScript& pendingScript)
// Implements the steps for 'An end tag whose tag name is "script"'
// http://whatwg.org/html#scriptEndTag
// Script handling lives outside the tree builder to keep each class simple.
-void HTMLScriptRunner::execute(PassRefPtr<Element> scriptElement, const TextPosition& scriptStartPosition)
+void HTMLScriptRunner::execute(PassRefPtrWillBeRawPtr<Element> scriptElement, const TextPosition& scriptStartPosition)
{
ASSERT(scriptElement);
// FIXME: If scripting is disabled, always just return.
@@ -328,4 +328,10 @@ void HTMLScriptRunner::runScript(Element* script, const TextPosition& scriptStar
}
}
+void HTMLScriptRunner::trace(Visitor* visitor)
+{
+ visitor->trace(m_parserBlockingScript);
+ visitor->trace(m_scriptsToExecuteAfterParsing);
+}
+
}
« Source/core/dom/ScriptRunner.h ('K') | « Source/core/html/parser/HTMLScriptRunner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698