Commit 75c3e075 authored by Kevin Ellis's avatar Kevin Ellis Committed by Commit Bot

Add safeguard against propagating events with an invalid execution context.

This is a speculative fix for 997076. Animation::ContextDestroyed sets a
flag to indicate that the animation is finished and prevents propagation of
the finished event. With the code health refactoring in 1739386 and 1773536,
the updates could continue after an execution context is destroyed.

Bug: 997076
Change-Id: I81d80b45428801abde61ad4122c2027ffe15efc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1776732
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: default avatarStephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691875}
parent 0ec9b207
......@@ -1420,6 +1420,10 @@ bool Animation::Update(TimingUpdateReason reason) {
if (!timeline_)
return false;
ExecutionContext* context = GetExecutionContext();
if (!context || context->IsContextDestroyed())
return false;
ClearOutdated();
bool idle = CalculateAnimationPlayState() == kIdle;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment