Closed Bug 1621576 Opened 5 years ago Closed 5 years ago

Add a linter rule to check unbalanced addObserver/removeObserver

Categories

(DevTools :: Framework, task, P3)

task

Tracking

(firefox76 fixed)

RESOLVED FIXED
Firefox 76
Tracking Status
firefox76 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

Details

Attachments

(2 files)

Follow up to the investigation in Bug 1609201.

Services' addObserver (obs, prefs) APIs should always have a corresponding removeObserver call to avoid leaks.

We already have a balanced-listener eslint rule, we can make a slightly different version to handle addObserver/removeObserver.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eddc5606b9ba Add a linter rule to check unbalanced addObserver/removeObserver r=Standard8 https://hg.mozilla.org/integration/autoland/rev/05ebd9c6bcc9 Apply mozilla/balanced-observers eslint rule in devtools r=ochameau
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: