Closed
Bug 1184626
Opened 10 years ago
Closed 10 years ago
Service worker receives duplicate push events for a single push
Categories
(Core :: DOM: Push Subscriptions, defect)
Core
DOM: Push Subscriptions
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: eeejay, Assigned: eeejay)
References
Details
Attachments
(2 files)
1.78 KB,
patch
|
Details | Diff | Splinter Review | |
40 bytes,
text/x-review-board-request
|
smaug
:
review+
|
Details |
I actually see a lot of duplicate push events when i develop a new app. But I managed to at least reproduce the case where two events are dispatched in a mochitest.
Assignee | ||
Comment 1•10 years ago
|
||
Bug 1184626 - Add a per-process push message listener. r?smaug
Attachment #8637345 -
Flags: review?(bugs)
Updated•10 years ago
|
Attachment #8637345 -
Flags: review?(bugs) → review+
Comment 4•10 years ago
|
||
(I tried MozReview again, but ended up downloading the diff after all. Much easier for me to see the changes that way. Silly old brains too used to the old habits.)
url: https://hg.mozilla.org/integration/mozilla-inbound/rev/2603fb3e8f71329a5380b4d313848a7f28d328b2
changeset: 2603fb3e8f71329a5380b4d313848a7f28d328b2
user: Eitan Isaacson <eitan@monotonous.org>
date: Fri Jul 17 14:54:38 2015 -0700
description:
Bug 1184626 - Add a per-process push message listener. r=smaug
Comment 8•10 years ago
|
||
> Cu.import("resource://gre/modules/PushServiceChildPreload.jsm");
You loaded this module in toolkit/process-content.js, but unfortunately this is not loaded in b2g.
Is there anywhere else we could move this line for the module to actually be loaded on all of our platforms?
Flags: needinfo?(nsm.nikhil)
Blocks: 1153499
Flags: needinfo?(nsm.nikhil)
Comment 9•10 years ago
|
||
Assignee: nobody → eitan
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
![]() |
||
Comment 10•10 years ago
|
||
(In reply to Robert Bindar from comment #8)
> > Cu.import("resource://gre/modules/PushServiceChildPreload.jsm");
>
> You loaded this module in toolkit/process-content.js, but unfortunately this
> is not loaded in b2g.
> Is there anywhere else we could move this line for the module to actually be
> loaded on all of our platforms?
We are going to need this for b2g (bug 1151180). Nikhil can you respond to Robert's question?
Flags: needinfo?(nsm.nikhil)
(In reply to Robert Bindar from comment #8)
> > Cu.import("resource://gre/modules/PushServiceChildPreload.jsm");
>
> You loaded this module in toolkit/process-content.js, but unfortunately this
> is not loaded in b2g.
> Is there anywhere else we could move this line for the module to actually be
> loaded on all of our platforms?
My apologies. When I added the blocking, I did not realize the ni? would get cleared.
If we use system messages to deal with spawning/messaging a child process, then we don't need this. In that case, we'd have to modify PushService#notifyApp() to use the right interfaces on the parent side for system messages.
Flags: needinfo?(nsm.nikhil)
Comment 12•10 years ago
|
||
Thanks Nikhil!
For now I added that line to dom/ipc/preload.js and with a small fix for Bug 1187481, the push api works ok for both desktop and b2g.
I'll take a look on how to take care of this with system messages, maybe this will also fix the bug when the app is killed and a notification comes in.
Quick question: is there any way we could send the system message to the right child (that susbscribed the for push) and not broadcast to all the children (potentially malicious ones too)?
Flags: needinfo?(nsm.nikhil)
(In reply to Robert Bindar from comment #12)
> Thanks Nikhil!
>
> For now I added that line to dom/ipc/preload.js and with a small fix for Bug
> 1187481, the push api works ok for both desktop and b2g.
>
> I'll take a look on how to take care of this with system messages, maybe
> this will also fix the bug when the app is killed and a notification comes
> in.
>
> Quick question: is there any way we could send the system message to the
> right child (that susbscribed the for push) and not broadcast to all the
> children (potentially malicious ones too)?
This would require modifying the system messages code to attach some sort of unique id along with the 'push' "signal". I'm not sure that is worth the effort until we allow data to be sent in the push.
Flags: needinfo?(nsm.nikhil)
You need to log in
before you can comment on or make changes to this bug.
Description
•