mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1704876 - Fix a shutdown crash when we race to update an animated vector image. r=tnikkel
If we are shutting down, the document for a VectorImage may be cleared. If a refresh tick raced with the shutdown, we might try to deref the null document. Differential Revision: https://phabricator.services.mozilla.com/D132953
This commit is contained in:
parent
00d79258e2
commit
90fb928d6b
@ -481,8 +481,13 @@ VectorImage::RequestRefresh(const TimeStamp& aTime) {
|
||||
return;
|
||||
}
|
||||
|
||||
PendingAnimationTracker* tracker =
|
||||
mSVGDocumentWrapper->GetDocument()->GetPendingAnimationTracker();
|
||||
Document* doc = mSVGDocumentWrapper->GetDocument();
|
||||
if (!doc) {
|
||||
// We are racing between shutdown and a refresh.
|
||||
return;
|
||||
}
|
||||
|
||||
PendingAnimationTracker* tracker = doc->GetPendingAnimationTracker();
|
||||
if (tracker && ShouldAnimate()) {
|
||||
tracker->TriggerPendingAnimationsOnNextTick(aTime);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user