Open
Bug 814210
Opened 12 years ago
Updated 2 years ago
IncrementAnimationConsumers() and DecrementAnimationConsumers() should always be balanced
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Core
Layout: Images, Video, and HTML Frames
Tracking
()
NEW
People
(Reporter: seth, Unassigned)
References
(Blocks 1 open bug)
Details
Right now we intend to make it illegal not to balance calls to IncrementAnimationConsumers() and DecrementAnimationConsumers(). If the animation consumer count is not zero by the time an Image is destroyed, we'll raise an assertion. This should help shake out any misuse of the animation-related APIs.
Unfortunately, there is existing code which does not balance its calls. I am aware of the following examples:
- nsBulletFrame. See (https://mxr.mozilla.org/mozilla-central/source/layout/generic/nsBulletFrame.cpp#1500).
- nsTreeImageListener. See (https://mxr.mozilla.org/mozilla-central/source/layout/xul/base/src/tree/src/nsTreeImageListener.cpp#36).
- nsImageBoxFrame. See (https://mxr.mozilla.org/mozilla-central/source/layout/xul/base/src/nsImageBoxFrame.cpp#620).
Before we put the assertion in we need to fix these cases.
Reporter | ||
Comment 1•12 years ago
|
||
The comments around these cases suggest that the code was written this way intentionally.
@Josh: I was told that you might know why this code is the way it is. Any ideas? Know where we can put a call to DecrementAnimationConsumers() to balance things out?
Comment 2•12 years ago
|
||
Nope; I'm clueless about those bits.
Comment 3•12 years ago
|
||
Bobby/Kyle: I believe one of you implemented this?
Comment 4•12 years ago
|
||
I believe it was azakai.
Comment 5•12 years ago
|
||
I believe that for technical reasons there was no practical place to put a call to DecrementAnimationConsumers for those cases, and we were ok with letting the animation continue until the element was no longer needed,
https://bugzilla.mozilla.org/show_bug.cgi?id=359608#c67
Updated•6 years ago
|
Product: Core → Core Graveyard
Updated•6 years ago
|
Product: Core Graveyard → Core
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•