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

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

Issue 1620983002: Also transfer pending in-order scripts upon element moving to new document (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also remove is-disposed checking; unnecessary Created 4 years, 11 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: 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 a0bcc3b8993e1984ee146596deb973566f016d0d..51cc3de3567c61ce4b52e03b47cd7801bd537838 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -467,9 +467,9 @@ void ScriptLoader::notifyFinished(Resource* 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
- // document. In that case, we must notify the ScriptRunner of the new
- // document, not the ScriptRunner of the old docuemnt.
+ // 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;

Powered by Google App Engine
This is Rietveld 408576698