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

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

Issue 891263003: Keep SVGImage alive across its animation timer callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/graphics/SVGImageChromeClient.cpp
diff --git a/Source/core/svg/graphics/SVGImageChromeClient.cpp b/Source/core/svg/graphics/SVGImageChromeClient.cpp
index 331860cd6e53373c47b0b837ab9add0d040826f2..ab8057a6cbf6da49516efbc0c72d8e0334d5164d 100644
--- a/Source/core/svg/graphics/SVGImageChromeClient.cpp
+++ b/Source/core/svg/graphics/SVGImageChromeClient.cpp
@@ -87,6 +87,12 @@ void SVGImageChromeClient::animationTimerFired(Timer<SVGImageChromeClient>*)
// images can't have any so we assert there's no script.
ScriptForbiddenScope forbidScript;
m_image->frameView()->page()->animator().serviceScriptedAnimations(monotonicallyIncreasingTime());
haraken 2015/02/02 10:49:01 m_image is on stack and thus it's protected, isn't
sof 2015/02/02 10:51:40 Not necessarily. "this" would be, but it is not a
haraken 2015/02/02 10:55:42 ah, understood... This looks nasty and we might wa
fs 2015/02/02 11:53:47 Isn't 'this' owned by 'm_image' here though?
+
+ // If a GC strikes during the previous call and the SVG image isn't
+ // otherwise referred to, it will be finalized and m_image is cleared.
+ if (!m_image)
+ return;
+
m_image->frameView()->updateLayoutAndStyleForPainting();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698