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

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

Issue 1718083005: Re-order unregistration and detachment of failed ScriptLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | third_party/WebKit/Source/core/dom/ScriptRunner.cpp » ('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 910288e42f2bec6332d65f4357934511c9adc49d..3c86d583090ca87516a32e8965eba6611c283906 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -463,14 +463,9 @@ void ScriptLoader::notifyFinished(Resource* resource)
ScriptRunner::ExecutionType runOrder = m_willExecuteInOrder ? ScriptRunner::IN_ORDER_EXECUTION : ScriptRunner::ASYNC_EXECUTION;
if (m_resource->errorOccurred()) {
- dispatchErrorEvent();
- // The error handler can move the HTMLScriptElement to a new document.
- // In that case, we must notify the ScriptRunner of the new document,
- // not the ScriptRunner of the old docuemnt.
- contextDocument = m_element->document().contextDocument().get();
- if (!contextDocument)
- return;
contextDocument->scriptRunner()->notifyScriptLoadError(this, runOrder);
+ dispatchErrorEvent();
+ detach();
return;
}
contextDocument->scriptRunner()->notifyScriptReady(this, runOrder);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ScriptRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698