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

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

Issue 1526293003: Gracefully discharge a failed script load in disposed documents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | third_party/WebKit/Source/core/dom/ScriptRunner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/ScriptLoader.cpp
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
index 554bbf9da159c86221ee88493d13c9461ac800c2..711c08e3a0204327cc520a2f769365e6adce0316 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -459,6 +459,7 @@ void ScriptLoader::notifyFinished(Resource* resource)
ASSERT_UNUSED(resource, resource == m_resource);
+ ScriptRunner::ExecutionType runOrder = m_willExecuteInOrder ? ScriptRunner::IN_ORDER_EXECUTION : ScriptRunner::ASYNC_EXECUTION;
if (m_resource->errorOccurred()) {
dispatchErrorEvent();
// dispatchErrorEvent might move the HTMLScriptElement to a new
@@ -467,14 +468,10 @@ void ScriptLoader::notifyFinished(Resource* resource)
contextDocument = m_element->document().contextDocument().get();
if (!contextDocument)
return;
- contextDocument->scriptRunner()->notifyScriptLoadError(this, m_willExecuteInOrder ? ScriptRunner::IN_ORDER_EXECUTION : ScriptRunner::ASYNC_EXECUTION);
+ contextDocument->scriptRunner()->notifyScriptLoadError(this, runOrder);
return;
}
- if (m_willExecuteInOrder)
- contextDocument->scriptRunner()->notifyScriptReady(this, ScriptRunner::IN_ORDER_EXECUTION);
- else
- contextDocument->scriptRunner()->notifyScriptReady(this, ScriptRunner::ASYNC_EXECUTION);
-
+ contextDocument->scriptRunner()->notifyScriptReady(this, runOrder);
m_pendingScript.stopWatchingForLoad(this);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ScriptRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698