Index: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp |
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp |
index 8c34ea90b7adca781799ab40528b5f1a96055a91..5af059e5e22570913c9fcf0067604eace2dbdf95 100644 |
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp |
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp |
@@ -30,6 +30,7 @@ |
#include "core/animation/DocumentAnimations.h" |
#include "core/animation/DocumentTimeline.h" |
#include "core/dom/NodeTraversal.h" |
+#include "core/dom/TaskRunnerHelper.h" |
#include "core/dom/shadow/FlatTreeTraversal.h" |
#include "core/frame/FrameView.h" |
#include "core/frame/LocalFrame.h" |
@@ -640,8 +641,15 @@ void SVGImage::LoadCompleted() { |
case kWaitingForAsyncLoadCompletion: |
load_state_ = kLoadCompleted; |
- if (GetImageObserver()) |
- GetImageObserver()->AsyncLoadCompleted(this); |
+ if (GetImageObserver()) { |
+ TaskRunnerHelper::Get(TaskType::kDOMManipulation, |
fs
2017/05/19 09:06:49
Since this is a task posted on a task runner belon
hiroshige
2017/05/19 20:28:52
This is because
- The frame etc. of the "client/in
|
+ ToLocalFrame(page_->MainFrame())->GetDocument()) |
kouhei (in TOK)
2017/05/19 05:20:54
->GetDocument() not needed. TaskRunnerHelper::Get
hiroshige
2017/05/19 20:28:52
Done.
|
+ ->PostTask( |
+ BLINK_FROM_HERE, |
+ WTF::Bind(&ImageObserver::AsyncLoadCompleted, |
+ WeakPersistent<ImageObserver>(GetImageObserver()), |
yhirano
2017/05/19 06:55:29
Why weak?
hiroshige
2017/05/19 20:28:52
I think Persistent will also work well here.
I mad
|
+ RefPtr<SVGImage>(this))); |
+ } |
break; |
case kDataChangedNotStarted: |