Closed Bug 1588002 Opened 5 years ago Closed 5 years ago

Make sure to remove the wakelock listener in browser_media_wakelock.js in cases where the callback is never called

Categories

(Toolkit :: General, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

getWakeLockState inside of browser_media_wakelock.js adds a nsIDOMMozWakeLockListener to listen for wake lock notifications for the test.

It looks, however, like the listener is only ever removed when a notification is seen. In more than one case, it looks like a listener is added when a notification is not expected, so that listener is never removed.

I don't know why this wasn't leaking for the non-Fission case, but it was definitely causing a leak-the-world leak with Fission enabled.

I've modified the test so that in the event that the notification was not expected, we still remove the listener.

Assignee: nobody → mconley
Priority: -- → P2
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6b0a3059d313
Make sure to remove every nsIDOMMozWakeLockListener added by browser_media_wakelock.js even if a notification is not seen. r=alwu
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: