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

Unified Diff: third_party/WebKit/Source/core/svg/graphics/SVGImage.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/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 226e10b05a91d3102d8723bdfcad8c092c4bf825..c2bd0579db5418a03324dab297cedeace4f258f8 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
@@ -569,6 +569,9 @@ bool SVGImage::MaybeAnimated() {
}
void SVGImage::ServiceAnimations(double monotonic_animation_start_time) {
+ if (!GetImageObserver())
+ return;
+
// If none of our observers (sic!) are visible, or for some other reason
// does not want us to keep running animations, stop them until further
// notice (next paint.)

Powered by Google App Engine
This is Rietveld 408576698