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

Side by Side 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, 6 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 if (playStateInternal() == Idle) 829 if (playStateInternal() == Idle)
830 return; 830 return;
831 831
832 m_holdTime = currentTimeInternal(); 832 m_holdTime = currentTimeInternal();
833 m_held = true; 833 m_held = true;
834 // TODO 834 // TODO
835 m_playState = Idle; 835 m_playState = Idle;
836 m_startTime = nullValue(); 836 m_startTime = nullValue();
837 m_currentTimePending = false; 837 m_currentTimePending = false;
838 838
839 InspectorInstrumentation::didCancelAnimation(timeline()->document(), this); 839 if (timeline())
840 InspectorInstrumentation::didCancelAnimation(timeline()->document(), thi s);
840 } 841 }
841 842
842 void Animation::beginUpdatingState() 843 void Animation::beginUpdatingState()
843 { 844 {
844 // Nested calls are not allowed! 845 // Nested calls are not allowed!
845 ASSERT(!m_stateIsBeingUpdated); 846 ASSERT(!m_stateIsBeingUpdated);
846 m_stateIsBeingUpdated = true; 847 m_stateIsBeingUpdated = true;
847 } 848 }
848 849
849 void Animation::endUpdatingState() 850 void Animation::endUpdatingState()
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 visitor->trace(m_content); 1024 visitor->trace(m_content);
1024 visitor->trace(m_timeline); 1025 visitor->trace(m_timeline);
1025 visitor->trace(m_pendingFinishedEvent); 1026 visitor->trace(m_pendingFinishedEvent);
1026 visitor->trace(m_finishedPromise); 1027 visitor->trace(m_finishedPromise);
1027 visitor->trace(m_readyPromise); 1028 visitor->trace(m_readyPromise);
1028 EventTargetWithInlineData::trace(visitor); 1029 EventTargetWithInlineData::trace(visitor);
1029 ActiveDOMObject::trace(visitor); 1030 ActiveDOMObject::trace(visitor);
1030 } 1031 }
1031 1032
1032 } // namespace 1033 } // namespace
OLDNEW
« 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