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

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: ALLOW_UNUSED => ALLOW_UNUSED_LOCAL 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
Index: Source/core/dom/ScriptLoader.cpp
diff --git a/Source/core/dom/ScriptLoader.cpp b/Source/core/dom/ScriptLoader.cpp
index e51592dab70ce86c91374db04e706e305ec30768..848a4251d4786ae3074e125fbdcd11f0fcfa8625 100644
--- a/Source/core/dom/ScriptLoader.cpp
+++ b/Source/core/dom/ScriptLoader.cpp
@@ -78,6 +78,11 @@ ScriptLoader::~ScriptLoader()
m_pendingScript.stopWatchingForLoad(this);
haraken 2014/10/17 12:35:29 This won't touch other on-heap objects, so looks s
}
+void ScriptLoader::trace(Visitor* visitor)
+{
+ visitor->trace(m_pendingScript);
+}
+
void ScriptLoader::didNotifySubtreeInsertionsToDocument()
{
if (!m_parserInserted)
@@ -366,7 +371,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()) {
@@ -449,4 +455,4 @@ ScriptLoader* toScriptLoaderIfPossible(Element* element)
return 0;
}
-}
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698