Closed
Bug 1203331
Opened 9 years ago
Closed 9 years ago
Use SingletonEventManager in a few places
Categories
(WebExtensions :: Untriaged, defect)
WebExtensions
Untriaged
Tracking
(firefox44 fixed)
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: billm, Assigned: billm)
References
Details
Attachments
(1 file)
6.87 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
I've realized that EventManager is causing a lot of problems. In theory, it consolidates event registration. So if the extension calls addListener 10 times, we only register a real listener once and then notify the add-on 10 times. Some of our code takes advantage of this behavior by assuming a single callback can be registered per extension rather than having to deal with a Set of callbacks. However, there's a subtle problem with this. The EventManager is does one registration per content, and a given extension can have many contexts (one for the background page, one for a popup, and some for extension tabs). So if you try to register an onAlarm listener in a popup and again in a background page, one of them will be ignored. Ideally I would convert these to SingletonEventManagers in preparation for bug 1203330. However, SingletonEventManager needs some additional work for that to happen, so I'd like to land this as-is. A number of tests in other bugs depend on it, so this blocks several things.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8658978 -
Flags: review?(gkrizsanits)
Updated•9 years ago
|
Attachment #8658978 -
Flags: review?(gkrizsanits) → review+
Comment 4•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/14b95ac5262b
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•