Closed Bug 1654752 Opened 5 years ago Closed 5 years ago

Remove usage of actorHasMethod in animation inspector

Categories

(DevTools :: Inspector: Animations, task, P3)

task

Tracking

(firefox84 fixed)

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(1 file)

actorHasMethod has too many pitfalls to be reliably used.

https://searchfox.org/mozilla-central/rev/dcd9c2d2bc19d96d487825eb70c2333a4d60994e/devtools/client/inspector/animation/animation.js#535

    if (typeof this.hasPausePlaySome === "undefined") {
      this.hasPausePlaySome = await this.inspector.currentTarget.actorHasMethod(
        "animations",
        "pauseSome"
      );
    }

We should update the animation inspector to use traits instead of actorHasMethod.
However, it looks like this check was introduced for backward compatibility and can probably be simply removed. "pauseSome" should be defined on all animations actors.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → Inspector: Animations
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

The related backward compatibility code was only to support FF62 or older and can be removed.

Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/34a37fea0d4f [devtools] Remove actorHasMethod usage in animation inspector r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: