Closed
Bug 1156987
Opened 10 years ago
Closed 8 years ago
Extract devtools event-emitter.js to toolkit
Categories
(Toolkit :: General, defect)
Toolkit
General
Tracking
()
RESOLVED
DUPLICATE
of bug 1356231
People
(Reporter: Yoric, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
|
39 bytes,
text/x-review-board-request
|
Details |
At the moment, our only mechanism for observer notifications is nsIObserverService. It is useful, but it has a number drawbacks:
- it is easy to get the topic wrong;
- it is clearly not designed to let us put a JS object in a notification;
- error-handling is non-existent.
We could easily implement a mechanism that would not have these drawbacks.
As a first application, I would like to make it simple to [un]subscribe to AddonWatcher notifications.
| Reporter | ||
Comment 1•10 years ago
|
||
/r/7413 - Bug 1156987 - Simple event mechanism
Pull down this commit:
hg pull -r 28d73a46637fcc3e1d0bbb45dea5314615f336ef https://reviewboard-hg.mozilla.org/gecko/
| Reporter | ||
Updated•10 years ago
|
Attachment #8595622 -
Flags: review?(dtownsend)
| Reporter | ||
Comment 2•10 years ago
|
||
Comment on attachment 8595622 [details]
MozReview Request: bz://1156987/Yoric
/r/7413 - Bug 1156987 - Simple event mechanism
Pull down this commit:
hg pull -r 28d73a46637fcc3e1d0bbb45dea5314615f336ef https://reviewboard-hg.mozilla.org/gecko/
| Reporter | ||
Comment 3•10 years ago
|
||
https://reviewboard.mozilla.org/r/7411/#review6175
Note that this is actually a f? rather than a r?.
Comment 4•10 years ago
|
||
Comment on attachment 8595622 [details]
MozReview Request: bz://1156987/Yoric
https://reviewboard.mozilla.org/r/7411/#review6179
Attachment #8595622 -
Flags: review?(dtownsend)
Comment 5•10 years ago
|
||
Comment on attachment 8595622 [details]
MozReview Request: bz://1156987/Yoric
For avoiding duplication and consistency I think we should clean up the core code from http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/event-emitter.js and put it in toolkit/modules/EventEmitter.jsm. It has a nice API including a promise based once form.
Attachment #8595622 -
Flags: feedback-
| Reporter | ||
Updated•10 years ago
|
Summary: It would be nice to have a simple event mechanism → Extract devtools event-emitter.js to toolkit
| Reporter | ||
Comment 6•10 years ago
|
||
Attachment #8595622 -
Attachment is obsolete: true
| Reporter | ||
Comment 7•10 years ago
|
||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•