AnimationsActor methods can be called with AnimationPlayerActors that are not handled anymore
Categories
(DevTools :: Inspector: Animations, defect)
Tracking
(firefox147 fixed)
| Tracking | Status | |
|---|---|---|
| firefox147 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
Details
Attachments
(1 file)
On the AnimationsActor, we have a few methods that can be called with AnimationPlayerActors https://searchfox.org/firefox-main/rev/70425199e9a5fa80aa7419fa51763013a67226e1/devtools/server/actors/animation.js#795,798-800,808,811-813,821,824,827-828,846,849,851-852
/**
...
* @param {Array} actors A list of AnimationPlayerActor.
*/
pauseSome(actors) {
...
/**
...
* @param {Array} actors A list of AnimationPlayerActor.
*/
playSome(actors) {
...
/**
...
* @param {Array} players A list of AnimationPlayerActor.
...
*/
setCurrentTimes(players, time, shouldPause) {
...
/**
...
* @param {Array} actors A list of AnimationPlayerActor.
...
*/
setPlaybackRates(players, rate) {
This is subject to race conditions: the client might call this while the AnimationsActor is sending a mutations event indicating that some animations were removed.
Then, performing any action on those player (pausing, setting time, …) might actually trigger a new, unwanted, mutation, which will cause both the server state and the client state to be out of date.
To fix this, we should filter out actors which are not into AnimationsActor#actors array.
| Assignee | ||
Comment 1•18 days ago
|
||
AnimationActor pauseSome, playSome, setCurrentTimes and setPlaybackRates
all take an array of AnimationPlayerActor instances for which we'll perform
some operation on their underlying animation.
It can happen that some of those actors are not handled by the AnimationsActor
anymore (e.g. the animation stopped, but the client wasn't updated yet).
Performing any action on those unhandled player (pausing, setting time, …) might
actually trigger a new, unwanted, mutation, which will cause both the server
state and the client state to be out of date.
This patch filters out actors which are not into AnimationsActor#actors to avoid
such issue.
Updated•18 days ago
|
Comment 3•15 days ago
|
||
| bugherder | ||
Updated•4 hours ago
|
Description
•