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

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

Issue 2908333002: Make Image::image_observer_ WeakPersistent (Closed)
Patch Set: 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 cd9495ca576e0c1911113a8422da2488b06c7bad..3739f39e710c72e7fba92c3463787a01a5e5a46b 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
@@ -577,6 +577,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