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

Unified Diff: Source/core/animation/Animation.cpp

Issue 1154423006: When cancelling an animation, add missing timeline-detach check. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add test Created 5 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
« no previous file with comments | « LayoutTests/web-animations-api/animation-timeline-detached-no-crash.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/Animation.cpp
diff --git a/Source/core/animation/Animation.cpp b/Source/core/animation/Animation.cpp
index 8e1e3d64816ef2671ff01bfd0e8e3761ac3d8b53..5103120d88fef661182dd039d0726bcd241fb484 100644
--- a/Source/core/animation/Animation.cpp
+++ b/Source/core/animation/Animation.cpp
@@ -836,7 +836,8 @@ void Animation::cancel()
m_startTime = nullValue();
m_currentTimePending = false;
- InspectorInstrumentation::didCancelAnimation(timeline()->document(), this);
+ if (timeline())
+ InspectorInstrumentation::didCancelAnimation(timeline()->document(), this);
}
void Animation::beginUpdatingState()
« no previous file with comments | « LayoutTests/web-animations-api/animation-timeline-detached-no-crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698