Commit Graph

192 Commits

Author SHA1 Message Date
Ben Kelly
96ee01e3b4 Bug 1462077 P2 Add a release assert in ClientHandle::Control() that enforces same-origin policy. r=asuth 2018-05-16 14:18:36 -07:00
Jan de Mooij
80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Ben Kelly
2a66c823ae Bug 1461326 Add some release assertions to dom/clients/manager code. r=baku 2018-05-15 08:53:54 -07:00
Ben Kelly
04944e362f Bug 1458971 P2 Make ClientSourceOpPromise hold the operation promise alive. r=baku 2018-05-09 08:48:01 -07:00
Ben Kelly
e2fb37ef0a Bug 1458971 Make operation actors explicitly hold references to the initiating object instead of using an extra MozPromise::Then(). r=baku 2018-05-08 08:11:58 -07:00
Ben Kelly
8ffadd093a Bug 1457157 P5 Make ClientManager keep its actor alive until the worker reaches Terminating. r=baku 2018-05-02 06:29:27 -07:00
Ben Kelly
173b706d4d Bug 1457157 P4 Use DOMMozPromiseRequestHolder in ClientSource. r=baku 2018-05-02 06:29:27 -07:00
Ben Kelly
24a39442fe Bug 1457157 P3 Replace ClientHandleOpChild MozPromise direct std::function callbacks. r=baku 2018-05-02 06:29:27 -07:00
Tiberius Oros
78bac61f63 Backed out 7 changesets (bug 1450644, bug 1454633) for for failing browser_storage_permission.js on a CLOSED TREE
Backed out changeset f4989e0da221 (bug 1454633)
Backed out changeset 08239799d43e (bug 1450644)
Backed out changeset cbe3ad4833b6 (bug 1450644)
Backed out changeset 0d2088370d0c (bug 1450644)
Backed out changeset 246fb3ee14cd (bug 1450644)
Backed out changeset 629e499c0f75 (bug 1450644)
Backed out changeset ed93e3547096 (bug 1450644)
2018-04-18 01:10:26 +03:00
Ben Kelly
9fc1327a84 Bug 1452528 Don't clear the controller on non-subresource channel loads when redirect mode is "follow". r=baku 2018-04-17 12:38:34 -07:00
Andrea Marchesini
f5dccf62ee Bug 1454633 - Client API doesn't need to use WorkerHolder with status = Closing, r=bkelly 2018-04-17 20:51:04 +02:00
Cosmin Sabou
254334df5b Backed out changeset 64ca4238a420 (bug 1454633) for mochitest failures on dom/workers/test/test_WorkerDebugger.xul. CLOSED TREE 2018-04-17 17:41:02 +03:00
Andrea Marchesini
113e0a55d9 Bug 1454633 Client API doesn't need to use WorkerHolder with status = Closing, r=bkelly
This is not needed because Client API is used in ServiceWorkerGlobalScope where
self.close() doesn't exist.
2018-04-17 15:57:46 +02:00
Nika Layzell
da7423dfa5 Bug 1444151 - Part 4: Remove the now-unnecessary xpcom-style segment getters, r=valentin 2018-04-10 17:49:50 -04:00
Boris Zbarsky
4292bca4ee Bug 1449631 part 6. Remove nsIDOMEventTarget::DispatchEvent. r=smaug
MozReview-Commit-ID: 8YMgmMwZkAL
2018-04-05 13:42:41 -04:00
Ben Kelly
c7543d428d Bug 1441133 P1 Don't assert storage permission on windows that inherit the service worker. r=asuth 2018-03-01 08:13:56 -08:00
Sebastian Hengst
3eb3941bc5 Backed out 2 changesets (bug 1441133) for build bustage in beta simulations at dom/clients/manager/ClientSource.cpp:402: unused variable 'wp'. a=backout
Backed out changeset 275855621865 (bug 1441133)
Backed out changeset 7a4546e25adc (bug 1441133)

--HG--
extra : histedit_source : d38746923972091f05ad8f435c39e7fe38e57a18
2018-03-01 11:55:28 +02:00
Ben Kelly
8c55bc6898 Bug 1440705 P3 Assert that a client and its controlling service worker have a matching principal. r=asuth 2018-02-28 10:32:50 -08:00
Ben Kelly
0dd1174a39 Bug 1440705 P2 Separate ClientMatchPrincipalInfo() into a separate method and header. r=asuth 2018-02-28 10:32:50 -08:00
Ben Kelly
c6a37e4357 Bug 1441133 P1 Don't assert storage permission on windows that inherit the service worker. r=asuth 2018-02-28 10:31:29 -08:00
Ben Kelly
e67b89fe1c Bug 1439099 P2 Remove ServiceWorkerRegistrationInfo::GetByID(). r=asuth 2018-02-19 12:06:19 -08:00
Andrea Marchesini
8cdf705535 Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Boris Zbarsky
478687c2e8 Bug 1434686 part 4. Use IgnoreErrors() in dom/. r=mystor
MozReview-Commit-ID: GwVDrTLPTOb
2018-02-01 14:21:14 -05:00
Nika Layzell
785a14270e Bug 1431867 - Part 2: Add move constructors and assignment operators to IPDL unions, r=mccr8
MozReview-Commit-ID: IQVODEfMGi9
2018-02-01 11:30:50 -05:00
Ben Kelly
af73b55e78 Bug 1434342 P7 Use the global to GetOrCreate the ServiceWorker DOM instance. r=asuth 2018-01-31 09:10:27 -08:00
Andrea Marchesini
26352bfee1 Bug 1432963 - Fixing workers headers - part 17 - no LIBS=[workers] in moz.build files, r=smaug 2018-01-31 08:25:30 +01:00
Andrea Marchesini
a5bed23bd8 Bug 1432963 - Fixing workers headers - part 15 - static function in a workers namespace, r=smaug 2018-01-31 08:24:30 +01:00
Andrea Marchesini
2c7c69af24 Bug 1432963 - Fixing workers headers - part 14 - WorkerPrivate without workers namespace, r=smaug 2018-01-31 08:24:08 +01:00
Andrea Marchesini
063723a1f0 Bug 1432963 - Fixing workers headers - part 13 - WorkerHolder without workers namespace, r=smaug 2018-01-31 08:23:44 +01:00
Andrea Marchesini
528066218f Bug 1432963 - Fixing workers headers - part 8 - WorkerTargetHolder without workers namespace, r=smaug 2018-01-31 08:21:27 +01:00
Andrea Marchesini
9774cec092 Bug 1413112 - Fixing includes in dom/workers, r=bkelly 2018-01-30 10:14:00 +01:00
Ben Kelly
e71d8db226 Bug 1430139 P3 Remove workers namespace from service worker code. r=asuth 2018-01-26 13:08:59 -08:00
Ben Kelly
9225189e3a Bug 1231211 P3 Serialize LoadInfo's mClientInfo, mReservedClientInfo, and mReservedClientInfo members across IPC. r=valentin 2018-01-23 10:38:52 -05:00
Boris Zbarsky
16c84b6c1b Bug 1431846 part 2. Rename nsPIDOMWindowInner::GetNavigator() to Navigator(), since it never returns null. r=mystor
Also have it return a dom::Navigator.

MozReview-Commit-ID: 5thGopGWIk9
2018-01-22 12:59:15 -05:00
Andrew Osmond
83aecd3510 Bug 1431079 - Ensure we don't attempt to launch content processes during shutdown. r=smaug 2018-01-22 06:11:46 -06:00
Hiroyuki Ikezoe
7ec737b816 Bug 1431295 - Drop 'undef None' macro in dom/. r=baku
MozReview-Commit-ID: Fmd4A2c7yUu

--HG--
extra : rebase_source : fdad8ac6276efa1a3612eb1c9a2a9478270d426d
2018-01-18 14:12:51 +09:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Ben Kelly
b7d9339122 Bug 1425975 P14 Assert that storage is allowed when a ClientSource is both execution ready and controlled. r=asuth 2018-01-05 12:10:22 -05:00
Ben Kelly
423f2202f9 Bug 1425975 P13 Check for a different final document principal and reset the ClientSource when it happens. r=asuth 2018-01-05 12:10:22 -05:00
Ben Kelly
ed3bd4b27a Bug 1425975 P1 Add ClientHandle::OnDetach() which returns a MozPromise that resolves on actor destruction. r=asuth 2018-01-05 12:10:20 -05:00
Csoregi Natalia
0bf10c4d4e Backed out 14 changesets (bug 1425975) for M(5) permafails mochitest/test_ext_webrequest_filter.html. r=backout a=backout
Backed out changeset e6f4a2d1df9a (bug 1425975)
Backed out changeset 1e657fa97b71 (bug 1425975)
Backed out changeset 9e1544ec814d (bug 1425975)
Backed out changeset 0e50d9d1d069 (bug 1425975)
Backed out changeset fb89dbd922ba (bug 1425975)
Backed out changeset f2b451ce55d4 (bug 1425975)
Backed out changeset 4ce186c6d8f5 (bug 1425975)
Backed out changeset 6f520ab76d6a (bug 1425975)
Backed out changeset f091f5e182c4 (bug 1425975)
Backed out changeset 82d39ed8c831 (bug 1425975)
Backed out changeset df13eba47970 (bug 1425975)
Backed out changeset 553628a56e6a (bug 1425975)
Backed out changeset acf4d61babab (bug 1425975)
Backed out changeset b7ae11b5bce8 (bug 1425975)
2017-12-24 00:23:57 +02:00
Ben Kelly
e6fd22c374 Bug 1425975 P14 Assert that storage is allowed when a ClientSource is both execution ready and controlled. r=asuth 2017-12-22 21:09:20 -05:00
Ben Kelly
8a4820ecbd Bug 1425975 P13 Check for a different final document principal and reset the ClientSource when it happens. r=asuth 2017-12-22 21:09:20 -05:00
Ben Kelly
8e2abf779f Bug 1425975 P1 Add ClientHandle::OnDetach() which returns a MozPromise that resolves on actor destruction. r=asuth 2017-12-22 21:09:17 -05:00
Ben Kelly
0c4c26f91f Bug 1426253 P4 Assert that ClientSource::SetController() is never called on a client in private browsing mode. r=asuth 2017-12-20 10:53:19 -05:00
Ben Kelly
7c2e00408e Bug 1426253 P2 Use nsIDocument::GetClientInfo() where possible. r=asuth 2017-12-20 10:53:18 -05:00
Ben Kelly
36ae9f5253 Bug 1425316 P4 Note that a ClientSource has called register() for a SW scope and use it to match window console reports. r=asuth 2017-12-19 10:04:48 -05:00
Ben Kelly
13b91bfce7 Bug 1425614 P2 Make ClientManager and ClientHandle operation promises reject if called on a worker thread already shutting down. r=asuth 2017-12-18 16:42:10 -05:00
Ben Kelly
90251dcbd7 Bug 1425614 P1 Make ClientThing::MaybeExecute() call an optional failure callback. r=asuth 2017-12-18 16:42:10 -05:00
Ben Kelly
41971c4dc5 Bug 1425704 Fix nullptr deref in android-only Clients.openWindow() when browser is not running. r=asuth 2017-12-18 11:55:18 -05:00
Ben Kelly
63c97930f1 Bug 1293277 P7 Make ServiceWorkerManager use ClientHandle::Control() for claiming and ClientSource::SetController() fire the controller change event. r=baku 2017-12-12 15:44:48 -05:00
Ben Kelly
64d85c2b66 Bug 1293277 P1 Capture StorageAccess when snapshoting ClientSource state. r=baku 2017-12-12 15:44:46 -05:00
Ben Kelly
3816f9801c Bug 1424338 P7 Remove the ClientEndPoint union type for now. r=baku 2017-12-08 14:46:43 -05:00
Ben Kelly
32b65c1d6c Bug 1424338 P6 Implement ClientHandle::PostMessage() r=baku 2017-12-08 14:46:43 -05:00
Ben Kelly
daf4ea918b Bug 1424338 P5 Implement ClientHandle::Focus(). r=baku 2017-12-08 14:46:43 -05:00
Ben Kelly
280fdf002f Bug 1424338 P4 Implement ClientManager::OpenWindow(). r=baku 2017-12-08 14:46:43 -05:00
Ben Kelly
80571616a2 Bug 1424338 P3 Add ClientManager::Navigate() method. r=baku 2017-12-08 14:46:42 -05:00
Ben Kelly
c911e0c6bb Bug 1424338 P2 Add ClientManager::Claim() message to matching ClientSource objects. r=baku 2017-12-08 14:46:42 -05:00
Ben Kelly
783e26e13e Bug 1424338 P1 Implement ClientManager::MatchAll() to support clients.matchAll() WebAPI. r=baku 2017-12-08 14:46:42 -05:00
Ben Kelly
4e2dc7e51f Bug 1423913 P3 Don't register more shutdown handle if we create more than one ClientManagerService instance. r=baku 2017-12-08 11:52:07 -05:00
Ben Kelly
65e9628fa6 Bug 1423913 P2 Make callers expect infallble CreateSource() and CreateHandle(). r=baku 2017-12-08 11:52:07 -05:00
Ben Kelly
10e891e2d2 Bug 1423913 P1 Make ClientManager::CreateSource() and CreateHandle() infallible. Errors result in a detached object instead of nullptr. r=baku 2017-12-08 11:52:06 -05:00
Ben Kelly
45d997d075 Bug 1423412 P4 Add a ClientManager::GetInfoAndState() that retrieves the ClientInfo and ClientState for a given ID. r=baku 2017-12-05 20:45:23 -05:00
Ben Kelly
dc20c8c537 Bug 1423412 P2 Copy the service worker controller across redirects by default and clear it explicitly for non-subresource redirects. r=baku 2017-12-05 20:45:23 -05:00
Ben Kelly
fb38b7b228 Bug 1423412 P1 Actually mark window/worker ClientSource objects controlled when loaded with a controlling service worker. r=baku r=jld 2017-12-05 20:45:22 -05:00
Ben Kelly
bdf8207a0f Bug 1423328 Allow a caller to set a ClientSource controlled by a service worker using a ClientHandle. r=baku 2017-12-05 14:54:10 -05:00
Ben Kelly
2982dea3de Bug 1422983 Cycle collect the ClientSource object when owned by an nsGlobalWindowInner or nsDocShell object. r=mccr8 2017-12-04 22:13:33 -05:00
Ben Kelly
ae0ac28105 Bug 1420594 P2 Eagerly shutdown ClientManagerService. r=baku 2017-12-04 09:51:32 -05:00
Ben Kelly
73afebbc88 Bug 1420594 P1 Make ClientManagerService track active ClientManagerParent actors. r=baku 2017-12-04 09:51:32 -05:00
Dorel Luca
ba2b0cf4d1 Backed out 3 changesets (bug 1422314, bug 1420594) for failing xpcshell/test_ext_contentScripts_register.js on Android debug r=backout a=backout
Backed out changeset f5a3054a4c38 (bug 1420594)
Backed out changeset 7908b821ad3f (bug 1420594)
Backed out changeset b89daf5c23b8 (bug 1422314)
2017-12-04 15:35:07 +02:00
Ben Kelly
76d6394334 Bug 1420594 P2 Eagerly shutdown ClientManagerService. r=baku a=aryx on CLOSED TREE 2017-12-01 14:48:11 -05:00
Ben Kelly
5bd2e38996 Bug 1420594 P1 Make ClientManagerService track active ClientManagerParent actors. r=baku 2017-12-01 14:48:11 -05:00
shindli
268bcd38b5 Backed out 2 changesets (bug 1420594) for leaks in browser-chrome tests r=backout on a CLOSED TREE
Backed out changeset 007fde92382e (bug 1420594)
Backed out changeset ff3ee0cc91ab (bug 1420594)
2017-11-30 18:24:52 +02:00
Ben Kelly
559339f71a Bug 1420594 P2 Eagerly shutdown ClientManagerService. r=baku 2017-11-30 09:52:50 -05:00
Ben Kelly
0031cd668f Bug 1420594 P1 Make ClientManagerService track active ClientManagerParent actors. r=baku 2017-11-30 09:52:50 -05:00
Ben Kelly
9af975dbfd Bug 1419536 P4 Allow ClientSource objects to be frozen while in bfcache. r=baku 2017-11-21 15:13:05 -05:00
Ben Kelly
aeaf857c05 Bug 1419536 P1 Add a helper to handle Client objects properly on nsIChannels. r=baku 2017-11-21 15:13:04 -05:00
Ben Kelly
44e7d854dd Bug 1418007 P2 Track the client window or worker's event target on ClientSource. r=baku 2017-11-16 13:15:10 -05:00
Ben Kelly
156cd8dec2 Bug 1418007 P1 Allow the reserved/initial/source client data and service worker to be marked on LoadInfo. r=baku r=valentin 2017-11-16 13:15:09 -05:00
Jonathan Watt
35123b4b3b Bug 1417365 - Unified build issues in dom/clients. r=baku 2017-10-26 12:59:32 +01:00
Andrea Marchesini
155b15b8e0 Bug 1414755 - Get rid of ContentPrincipalInfoOriginNoSuffix, r=bz, r=bkelly
This patch uses MozURL in ServiceWorkerRegistrar and in DBScheme to obtain the
origin of a URL. This is safe because the URL is always http/https/ftp.

It also changes the serialization of Principal in nsJSPrincipals in order to
pass the originNoSuffix together with the OriginAttributes and the spec.
2017-11-15 11:19:26 +01:00
Ben Kelly
9bfa444242 Bug 1417172 P2 Add a way for the window/worker/docshell to mark a ClientSource execution ready. r=baku 2017-11-14 14:36:45 -05:00
Ben Kelly
8a74305d9d Bug 1417172 P1 Validate ClientSource creation path across IPC boundary. r=baku 2017-11-14 14:36:45 -05:00
Ben Kelly
db2e078440 Bug 1416086 Fix unused variable warnings when diagnostic assertions are disabled. r=baku 2017-11-10 00:21:26 -08:00
Ben Kelly
d7eca2ba76 Bug 1415779 P4 Add ClientHandle class and make it attach to the correct ClientSource. r=baku 2017-11-08 21:20:00 -08:00
Ben Kelly
a973dff21c Bug 1415779 P3 Add the ClientSource class and hook it into ClientManager/ClientManagerService. r=baku 2017-11-08 21:19:59 -08:00
Ben Kelly
4641badb26 Bug 1415779 P2 Add ClientManagerService and reference it from parent actors. r=baku 2017-11-08 21:19:59 -08:00
Ben Kelly
b0316788f6 Bug 1415779 P1 Add the ClientManager class. r=baku 2017-11-08 21:19:59 -08:00
Jonathan Watt
f10fc1e787 Bug 1413216 - Fix some missing includes in dom code. r=baku
MozReview-Commit-ID: 25hWPkXF0Wj
2017-10-12 13:50:23 +01:00
Ben Kelly
814922898d Bug 1413606 P2 Add IPC actor structure and boilerplate. r=baku 2017-11-01 13:19:38 -04:00
Ben Kelly
072e50166a Bug 1413606 P1 Add ClientThing base class. r=baku 2017-11-01 13:19:37 -04:00
Ben Kelly
11defef79c Bug 1412864 Add ClientInfo and ClientState types. r=baku 2017-10-30 13:35:08 -04:00