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

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

Issue 1939743002: Completely detach failed script loader before dispatching error event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: drop experimental assert Created 4 years, 8 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 | no next file » | 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 2b19ef87843d7094d9609e67a09d1dd809adbd41..d3926f00265e7d82017301a55fc050a935a556ea 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -464,8 +464,7 @@ void ScriptLoader::notifyFinished(Resource* resource)
{
DCHECK(!m_willBeParserExecuted);
- Document* elementDocument = &(m_element->document());
- Document* contextDocument = elementDocument->contextDocument();
+ Document* contextDocument = m_element->document().contextDocument();
if (!contextDocument)
return;
@@ -474,8 +473,8 @@ void ScriptLoader::notifyFinished(Resource* resource)
ScriptRunner::ExecutionType runOrder = m_willExecuteInOrder ? ScriptRunner::IN_ORDER_EXECUTION : ScriptRunner::ASYNC_EXECUTION;
if (m_resource->errorOccurred()) {
contextDocument->scriptRunner()->notifyScriptLoadError(this, runOrder);
- dispatchErrorEvent();
detach();
+ dispatchErrorEvent();
return;
}
contextDocument->scriptRunner()->notifyScriptReady(this, runOrder);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698