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

Unified Diff: Source/core/svg/SVGScriptElement.cpp

Issue 532643002: Move pending async script to the correct resolved document. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update expected outputs. Created 6 years, 3 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 | « Source/core/html/HTMLScriptElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGScriptElement.cpp
diff --git a/Source/core/svg/SVGScriptElement.cpp b/Source/core/svg/SVGScriptElement.cpp
index aed347235f0873f06885603424445d49e6afde42..5ab4c0d2d457467d749b8a5cb93e8c803dc13b02 100644
--- a/Source/core/svg/SVGScriptElement.cpp
+++ b/Source/core/svg/SVGScriptElement.cpp
@@ -126,7 +126,8 @@ void SVGScriptElement::childrenChanged(const ChildrenChange& change)
void SVGScriptElement::didMoveToNewDocument(Document& oldDocument)
{
- oldDocument.scriptRunner()->movePendingAsyncScript(document().scriptRunner(), m_loader.get());
+ if (RefPtrWillBeRawPtr<Document> contextDocument = document().contextDocument().get())
+ oldDocument.scriptRunner()->movePendingAsyncScript(contextDocument->scriptRunner(), m_loader.get());
SVGElement::didMoveToNewDocument(oldDocument);
}
« no previous file with comments | « Source/core/html/HTMLScriptElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698