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

Unified Diff: third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.cpp

Issue 2905833003: Make Image::image_observer_ WeakPersistent (Closed)
Patch Set: Reflect comments Created 3 years, 7 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/svg/graphics/SVGImageChromeClient.cpp
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.cpp
index de6e9ec4ff408fbbe1808d91da72d759099766d8..5af954d40313b9ca606638abaa1b3dde9c4562b8 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.cpp
@@ -114,11 +114,12 @@ void SVGImageChromeClient::AnimationTimerFired(TimerBase*) {
// The SVGImageChromeClient object's lifetime is dependent on
// the ImageObserver (an ImageResourceContent) of its image. Should it
- // be dead and about to be lazily swept out, do not proceed.
+ // be dead and about to be lazily swept out, then GetImageObserver()
+ // becomes null and we do not proceed.
//
// TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid
// this explicit lifetime check.
- if (ThreadHeap::WillObjectBeLazilySwept(image_->GetImageObserver()))
+ if (!image_->GetImageObserver())
return;
image_->ServiceAnimations(MonotonicallyIncreasingTime());
« no previous file with comments | « third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp ('k') | third_party/WebKit/Source/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698