mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1501120 - Fix faulty assert when calculating memory footprint of animation. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D9506
This commit is contained in:
parent
782c5ea2b9
commit
8066d5c0b3
@ -305,10 +305,13 @@ AnimationFrameDiscardingQueue::AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf
|
||||
for (const RefPtr<imgFrame>& frame : mDisplay) {
|
||||
++i;
|
||||
if (mSize < i) {
|
||||
// First frame again, we already covered it above.
|
||||
MOZ_ASSERT(mFirstFrame.get() == frame.get());
|
||||
i = 1;
|
||||
continue;
|
||||
if (mFirstFrame.get() == frame.get()) {
|
||||
// First frame again, we already covered it above. We can have a
|
||||
// different frame in the first frame position in the discard queue
|
||||
// on subsequent passes of the animation. This is useful for recycling.
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
frame->AddSizeOfExcludingThis(aMallocSizeOf,
|
||||
|
Loading…
Reference in New Issue
Block a user