Commit Graph

29 Commits

Author SHA1 Message Date
Andrea Marchesini
ddb4518ad1 Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Ben Kelly
52ca083d1d Bug 1430139 P3 Remove workers namespace from service worker code. r=asuth 2018-01-26 13:08:59 -08:00
Ben Kelly
bcf3407d3d Bug 1430139 P2 Make the tree compile again after moving the code to dom/serviceworkers. r=asuth 2018-01-26 13:08:58 -08:00
Andrew McCreight
2c2e9cbbbe Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot
This was automatically generated by the script modeline.py.

MozReview-Commit-ID: BgulzkGteAL
2017-10-26 15:08:41 -07:00
Mike Hommey
261761b534 Bug 1407838 - Remove the remains of NS_Alloc/NS_Realloc/NS_Free. r=njn
Bug 1134923 removed the use of those functions in gecko, and left some
for the XPCOM standalone glue. The XPCOM standalone glue was severely
stripped down in bug 1306327, with the effect of removing the
implementation for those functions.

The remains in nsXPCOM.h are:
XPCOM_API(void*) NS_Alloc(size_t aSize);
XPCOM_API(void*) NS_Realloc(void* aPtr, size_t aSize);
XPCOM_API(void) NS_Free(void* aPtr);

With no implementation left, the first arm is never actually used, and
the second arm means every remaining use of those functions in the tree
is a macro expansion to one of moz_xmalloc, moz_xrealloc or free.
2017-10-12 11:08:44 +09:00
Andrew Sutherland
97cc8e3da2 Bug 1383905 - Push notifications should only use "web" content processes. r=bkelly
This introduces filtering to avoid attempting to dispatch notifications
to WebExtensions processes and other types of content processes.

This is dependent upon bug 1395827 changing xpcshell to create its child
processes with a remote type of "web" in order to not break the push
xpcshell tests.
2017-07-24 23:28:41 -04:00
Nicholas Nethercote
42d8740878 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm. 2017-08-21 20:01:27 +10:00
Michael Layzell
c4d400146d Bug 1352772 - Send permissions to the content process before dispatching push events, r=catalinb
MozReview-Commit-ID: DVLjumi9iBJ
2017-04-10 16:03:03 -04:00
Catalin Badea
1e1db86fe0 Bug 1300112 - Avoid duplicate push notifications by sending push messages to only one content process. r=kitcambridge 2017-03-09 11:12:49 +00:00
Kan-Ru Chen
a9b19d0584 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES
2016-08-24 14:47:04 +08:00
Kit Cambridge
38fc3d6771 Bug 1280106 - Don't send push events to service workers without a principal. r=dragana
MozReview-Commit-ID: JwTU633hENl
2016-06-27 08:22:59 -07:00
Kit Cambridge
55818e5451 Bug 1275434 - Notify "push-subscription-modified" observers in the child. r=dragana
MozReview-Commit-ID: H3DGrhEm3fn
2016-05-14 16:54:51 -07:00
Kit Cambridge
7a4fee08c1 Bug 1275434 - Refactor PushNotifier to clarify remoting logic. r=dragana
Previously, all `PushNotifier` methods checked the process type, and
either called `Notify*{Workers, Observers}` or sent an IPDL message.
The message handlers then called back in to `PushNotifier` from the
remote process.

This was clearer when we only sent worker event notifications to the
content process, and fired all observer notifications in the parent.
It became more complicated once we started notifying observers for all
subscriptions in both processes (bug 1266433). This makes it harder to
see omissions; for example, "push-subscription-modified" isn't
currently forwarded to the child, but "push-subscription-change" and
"push-message" are.

This patch moves the remoting code into `PushNotifier::Dispatch`, and
adds a base `PushDispatcher` class. Each notification type subclasses
this class and implements logic for sending messages and firing
observers and worker events. It's more code, but a bit easier to see
which methods are called where.

MozReview-Commit-ID: 7Q0eD7qXOrW
2016-05-19 19:01:34 -07:00
Kit Cambridge
1f29167357 Bug 1269436 - Always pass the principal to push observer notifications. r=dragana
MozReview-Commit-ID: J1vU3nRKlsa
2016-05-02 09:38:47 -07:00
Kit Cambridge
8692bb2df9 Bug 1269385 - Notify Dev Tools when a push subscription is modified. f=janx r=dragana
MozReview-Commit-ID: 3iTl7jH9IkB
2016-05-02 08:20:14 -07:00
Kit Cambridge
e628fbd8d1 Bug 1267889 - Always steal the error result in PushMessage::Json. r=dragana
MozReview-Commit-ID: FOpIoIYBCFW
2016-04-26 18:26:30 -07:00
Kit Cambridge
1dd23899d3 Bug 1266433 - Update the comments in the Push XPIDL interfaces. r=me
MozReview-Commit-ID: 7s9VFqYYV9s
2016-04-26 10:20:08 -07:00
Kit Cambridge
0021a5f6fc Bug 1266433 - Send an observer notification when a push subscription is lost. f=janx r=dragana
MozReview-Commit-ID: EjCVWje2jLB
2016-04-21 12:04:15 -07:00
Kit Cambridge
62be9628a4 Bug 1266433 - Send Push observer notifications to parent and content processes. f=janx r=dragana
MozReview-Commit-ID: 1aUS8HcQApo
2016-04-21 11:11:03 -07:00
Kit Cambridge
9d1b502f2b Bug 1247089 - Log Web Push decryption errors. r=bkelly
MozReview-Commit-ID: HEEq8IPlwBx
2016-03-28 13:33:20 -07:00
Kit Cambridge
93eaaf66fe Bug 1246341 - Add a test for push event error reporting. r=dragana
MozReview-Commit-ID: LABOJnYtpD5
2016-03-28 11:40:58 -07:00
Kit Cambridge
c1473206f5 Bug 1246341 - Report push event errors and rejections to the Push service. r=baku
MozReview-Commit-ID: D6fRPqojOEh
2016-03-28 11:50:39 -07:00
Mark Hammond
24eafc967c Bug 1252290 - load xpcom services registered with the category manager as being able to handle push notifications before delivering them. r=kitcambridge 2016-03-07 16:46:10 +11:00
Kit Cambridge
a708af0a0f Bug 1253438 - Expose Push observer notification topics. r=markh
MozReview-Commit-ID: HublNSAD3NY
2016-03-03 14:37:10 -08:00
Huma Zafar
b3082669b6 Bug 1206166 - Move FetchUtil::Consume methods into separate BodyUtil class and update Fetch.cpp and ServiceWorkerEvents.cpp accordingly. r=kitcambridge
MozReview-Commit-ID: KgEccQ2LPpC
2016-02-27 13:54:11 -08:00
Bogdan Postelnicu
11f4859ef2 Bug 1242436 - default value of ok = true in order to check the return of SendPush and SendPushSubscriptionChange. r=kitcambridge 2016-01-25 14:47:06 +02:00
Kit Cambridge
f3156a3121 Bug 1239584, Part 1 - Add nsIPushNotifier and nsIPushMessage interfaces. r=dragana 2016-01-13 22:19:51 -07:00
Kit Cambridge
6bbd351b71 Back out out 3 changesets (bug 1239584) for B2G build failures on a CLOSED TREE. 2016-01-22 11:06:14 -08:00
Kit Cambridge
80a8d6b653 Bug 1239584, Part 1 - Add nsIPushNotifier and nsIPushMessage interfaces. r=dragana 2016-01-13 22:19:51 -07:00