Closed
Bug 1181930
Opened 11 years ago
Closed 11 years ago
Refactoring: move the message broadcaster out of Webapps.jsm
Categories
(Core Graveyard :: DOM: Apps, defect)
Core Graveyard
DOM: Apps
Tracking
(firefox42 fixed)
RESOLVED
FIXED
mozilla42
| Tracking | Status | |
|---|---|---|
| firefox42 | --- | fixed |
People
(Reporter: fabrice, Assigned: fabrice)
Details
Attachments
(1 file, 2 obsolete files)
|
37.39 KB,
patch
|
ferjm
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•11 years ago
|
||
That's a small and safe refactoring, but I need it for another patch I'm working on.
Assignee: nobody → fabrice
Attachment #8631404 -
Flags: review?(ferjmoreno)
| Assignee | ||
Comment 2•11 years ago
|
||
| Assignee | ||
Comment 3•11 years ago
|
||
With the new module actually added to the patch...
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7e9556029e34
Attachment #8631404 -
Attachment is obsolete: true
Attachment #8631404 -
Flags: review?(ferjmoreno)
Attachment #8631408 -
Flags: review?(ferjmoreno)
| Assignee | ||
Updated•11 years ago
|
Attachment #8631408 -
Flags: review?(ferjmoreno)
| Assignee | ||
Comment 4•11 years ago
|
||
Now passing tests: https://treeherder.mozilla.org/#/jobs?repo=try&revision=fae526a85600
Attachment #8631408 -
Attachment is obsolete: true
Attachment #8639891 -
Flags: review?(ferjmoreno)
Comment 5•11 years ago
|
||
Comment on attachment 8639891 [details] [diff] [review]
apps-broadcaster.patch
Review of attachment 8639891 [details] [diff] [review]:
-----------------------------------------------------------------
Nice!
::: dom/apps/MessageBroadcaster.jsm
@@ +3,5 @@
> + * You can obtain one at http://mozilla.org/MPL/2.0/. */
> +
> +"use strict";
> +
> +const { utils: Cu, classes: Cc, interface: Ci } = Components;
None of these constants are used.
@@ +12,5 @@
> +this.EXPORTED_SYMBOLS = ["MessageBroadcaster"];
> +
> +this.MessageBroadcaster = {
> + appGetter: null,
> + children: [],
Maybe "childrens"
@@ +21,5 @@
> + }
> + this.appGetter = aAppGetter;
> + },
> +
> + addMessageListener: function(aMsgNames, aApp, aMm) {
Maybe add a comment explaining that listeners are ref counted.
@@ +22,5 @@
> + this.appGetter = aAppGetter;
> + },
> +
> + addMessageListener: function(aMsgNames, aApp, aMm) {
> + aMsgNames.forEach(function (aMsgName) {
Use arrow functions here and in the rest of the patch, please.
@@ +23,5 @@
> + },
> +
> + addMessageListener: function(aMsgNames, aApp, aMm) {
> + aMsgNames.forEach(function (aMsgName) {
> + let man = aApp && aApp.manifestURL;
s/man/manifestURL/g, please
@@ +46,5 @@
> +
> + // If the state reported by the registration is outdated, update it now.
> + if ((aMsgName === 'Webapps:FireEvent') ||
> + (aMsgName === 'Webapps:UpdateState')) {
> + if (man) {
if (man && ((aMsgName === 'Webapps:FireEvent') || (aMsgName === 'Webapps:UpdateState')))
Attachment #8639891 -
Flags: review?(ferjmoreno) → review+
Comment 7•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•