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

Unified Diff: Source/core/dom/ScriptLoader.cpp

Issue 660233002: Oilpan: move ScriptLoader to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No detachment of ScriptLoaders when finalizing ScriptRunner Created 6 years, 2 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
« no previous file with comments | « Source/core/dom/ScriptLoader.h ('k') | Source/core/dom/ScriptRunner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ScriptLoader.cpp
diff --git a/Source/core/dom/ScriptLoader.cpp b/Source/core/dom/ScriptLoader.cpp
index f3593b49426ff185a0dc2166009813312121c670..d61dc554b2e9ede8904da6599b899db21e0375ad 100644
--- a/Source/core/dom/ScriptLoader.cpp
+++ b/Source/core/dom/ScriptLoader.cpp
@@ -78,6 +78,12 @@ ScriptLoader::~ScriptLoader()
m_pendingScript.stopWatchingForLoad(this);
}
+void ScriptLoader::trace(Visitor* visitor)
+{
+ visitor->trace(m_element);
+ visitor->trace(m_pendingScript);
+}
+
void ScriptLoader::didNotifySubtreeInsertionsToDocument()
{
if (!m_parserInserted)
@@ -372,7 +378,8 @@ void ScriptLoader::execute()
ASSERT(m_pendingScript.resource());
bool errorOccurred = false;
ScriptSourceCode source = m_pendingScript.getSource(KURL(), errorOccurred);
- RefPtr<Element> element = m_pendingScript.releaseElementAndClear();
+ RefPtrWillBeRawPtr<Element> element = m_pendingScript.releaseElementAndClear();
+ ALLOW_UNUSED_LOCAL(element);
if (errorOccurred) {
dispatchErrorEvent();
} else if (!m_resource->wasCanceled()) {
@@ -455,4 +462,4 @@ ScriptLoader* toScriptLoaderIfPossible(Element* element)
return 0;
}
-}
+} // namespace blink
« no previous file with comments | « Source/core/dom/ScriptLoader.h ('k') | Source/core/dom/ScriptRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698