Closed Bug 1219974 Opened 9 years ago Closed 9 years ago

Add DisconnectIfExists() to MediaEventListener

Categories

(Core :: Audio/Video: Playback, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

Details

Attachments

(1 file)

It would come in handy when it is not easy to know whether this listener is already connected or not.
Bug 1219974 - Add DisconnectIfExists() to MediaEventListener. r=kinetik.
Attachment #8680939 - Flags: review?(kinetik)
Assignee: nobody → jwwang
Comment on attachment 8680939 [details]
MozReview Request: Bug 1219974 - Add DisconnectIfExists() to MediaEventListener. r=kinetik.

https://reviewboard.mozilla.org/r/23703/#review21211

Do you think there's value in keeping Disconnect() public, since all existing callers could call DisconnectIfExists() instead?
Attachment #8680939 - Flags: review?(kinetik) → review+
Thanks for the review.

As we have https://hg.mozilla.org/mozilla-central/file/1e700005a0dd/xpcom/threads/MozPromise.h#l839.

There is still merit in keeping Disconnect() when you know the listener should have been connected. It enforce some invariants and helps catch bugs where we think it is connected but in fact not.
https://hg.mozilla.org/mozilla-central/rev/11fef9ecdefb
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
removing the b2g 2.5 flag since this commit has been reverted due to an incorrect merge, sorry for the confusion
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: