Граф коммитов

23 Коммитов

Автор SHA1 Сообщение Дата
Perry Jiang a0f4d9f5ad Bug 1611046 - add ServiceWorker shutdown progress tracking r=dom-workers-and-storage-reviewers,asuth
ServiceWorkerShutdownState encapsulates the shutdown progress for a particular
ServiceWorker. The shutdown process involves a "shutdown message" passing
multiple threads in both parent/content processes; we report a progress update
when it's known that a shutdown message has reached a particular thread. The
idea is that in the event of a shutdown timeout, ServiceWorkerShutdownBlocker
will be able to provide diagnostics for where shutdown processes are stalled.

Differential Revision: https://phabricator.services.mozilla.com/D60791

--HG--
extra : moz-landing-system : lando
2020-01-29 10:08:35 +00:00
Narcis Beleuzu 18ef916675 Backed out changeset a59d382a7950 (bug 1611046) for bustages on nsCodeCoverage.cpp 2020-01-27 13:38:30 +02:00
Perry Jiang 380587aa2f Bug 1611046 - add ServiceWorker shutdown progress tracking r=dom-workers-and-storage-reviewers,asuth
ServiceWorkerShutdownState encapsulates the shutdown progress for a particular
ServiceWorker. The shutdown process involves a "shutdown message" passing
multiple threads in both parent/content processes; we report a progress update
when it's known that a shutdown message has reached a particular thread. The
idea is that in the event of a shutdown timeout, ServiceWorkerShutdownBlocker
will be able to provide diagnostics for where shutdown processes are stalled.

Differential Revision: https://phabricator.services.mozilla.com/D60791

--HG--
extra : moz-landing-system : lando
2020-01-24 22:59:48 +00:00
Perry Jiang c2250891d2 Bug 1264175 - remove FetchEvent.isReload r=dom-workers-and-storage-reviewers,valentin,sg,bzbarsky
isReload is no longer a property defined by the FetchEvent specification.

Differential Revision: https://phabricator.services.mozilla.com/D60774

--HG--
extra : moz-landing-system : lando
2020-01-25 00:05:12 +00:00
shindli 78f9c85759 Backed out changeset 86d1da74131f (bug 1264175) for causing mochitest failures in dom/serviceworkers/test/test_fetch_event.html CLOSED TREE 2020-01-24 06:18:04 +02:00
Perry Jiang 64699e71f7 Bug 1264175 - remove FetchEvent.isReload r=dom-workers-and-storage-reviewers,valentin,sg,bzbarsky
isReload is no longer a property defined by the FetchEvent specification.

Differential Revision: https://phabricator.services.mozilla.com/D60774

--HG--
extra : moz-landing-system : lando
2020-01-24 02:38:01 +00:00
Perry Jiang c0d0830d63 Bug 1578919 - Don't allow AutoIPCStream to outlive its IPCStream r=asuth
In ServiceWorkerPrivateImpl::SendFetchEvent, a heap-allocated AutoIPCStream can
point to a stack-allocated IPCStream (part of an IPCInternalRequest). If this
IPCStream is destroyed before the AutoIPCStream, the AutoIPCStream will have a
dangling pointer (and this is the case if SendFetchEvent is called when the
Service Worker's state is "activating" rather than "activated").

This patch moves around the logic to handle the AutoIPCStream's lifetime to
ensure it its lifetime is within its IPCStream's lifetime. The larger issue
might be that AutoIPCStream doesn't have inherent lifetime guarantees (it'll
definitely outlive its IPCStream if it points to its embedded one, but it
doesn't own any external IPCStreams it might point to).

Differential Revision: https://phabricator.services.mozilla.com/D48935

--HG--
extra : moz-landing-system : lando
2019-10-11 23:22:31 +00:00
Perry Jiang 87c3eb5a96 Bug 1575185 - Subscribe content processes spawning Service Workers to permission updates r=asuth
Previously, Service Workers could spawn in a process that isn't subscribed
to permission updates, which could happen if that process hadn't loaded any
same-origin documents. To address this, parent-process logic for spawning
Service Workers would snapshot the permissions state to be sent to a content
process.

Unfortunately, this approach could lead to outdated, unsynchronized permissions.
Note that nsIPermissionManager::SetPermissionsWithKey is only used to initialize
permissions for a given key and is a no-op if already called with the same key
in a given process. As a result, the following sequence of events could happen:

Assume a content process CP that isn't subscribed to permission changes for an
origin A:

1) Parent process decides to spawn an origin A Service Worker in CP,
snapshotting a value V for permission P.
2) The Service Worker is spawned in CP, setting CP's permission manager's
permission P to value V (for origin A).
3) Parent process updates its permission P to a value A', which is not
broadcasted to CP (because it's not subscribed).
4) By now, the initial Service Worker has been terminated, and the parent
process decides once again to spawn an origin A Service Worker in CP.
5) The Service Worker is spawned in CP, but the call to SetPermissionsWithKey
is a no-op, leaving CP1 with a mismatched value for permission P.

An additional scenario is if the parent process updates a permission during a
remote Service Worker's lifetime.

This patch, which would subscribe CP1 to permission updates when the parent
process knows a Service Worker would be spawned in CP1, prevents these problems.

Differential Revision: https://phabricator.services.mozilla.com/D48620

--HG--
extra : moz-landing-system : lando
2019-10-09 02:23:41 +00:00
Perry Jiang 4d1b5b9a5c Bug 1552945 - Start Service Workers in the parent process with parent-intercept. r=asuth,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D32492

--HG--
extra : moz-landing-system : lando
2019-08-20 15:21:11 +00:00
Perry Jiang 9f8937313f Bug 1231213 - Implement cross-process ServiceWorkerGlobalScope.skipWaiting(). r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26175

--HG--
extra : moz-landing-system : lando
2019-08-15 17:27:28 +00:00
Perry Jiang b1c2ec9ffc Bug 1231213 - Implement ServiceWorkerPrivateImpl to dispatch operations to content processes and respond to their results. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26174

--HG--
extra : moz-landing-system : lando
2019-08-15 17:27:23 +00:00
Dorel Luca 73975f1d28 Backed out 22 changesets (bug 1231213) for Browser-chrome failures on /workers/remoteworkers/RemoteWorkerChild.cpp
Backed out changeset 7e09ad9ceea6 (bug 1231213)
Backed out changeset a275eb0b1a19 (bug 1231213)
Backed out changeset 906b80778539 (bug 1231213)
Backed out changeset 6a40ab6852cb (bug 1231213)
Backed out changeset 216591953f97 (bug 1231213)
Backed out changeset 1de357bc1921 (bug 1231213)
Backed out changeset 8e3fedf6502a (bug 1231213)
Backed out changeset 1b9a8b022fce (bug 1231213)
Backed out changeset 85df1959eb98 (bug 1231213)
Backed out changeset 666bf4260046 (bug 1231213)
Backed out changeset 0b03a19a6dc1 (bug 1231213)
Backed out changeset 11f010e6d6e7 (bug 1231213)
Backed out changeset 6ed55807374f (bug 1231213)
Backed out changeset 395062aef2ec (bug 1231213)
Backed out changeset bacf8499ba7b (bug 1231213)
Backed out changeset bf5d60c7a85a (bug 1231213)
Backed out changeset cd434b787ce6 (bug 1231213)
Backed out changeset ee4565104217 (bug 1231213)
Backed out changeset 581653ef33dd (bug 1231213)
Backed out changeset 2d5628a0e52d (bug 1231213)
Backed out changeset 3449c2eba4c6 (bug 1231213)
Backed out changeset ae221b628899 (bug 1231213)
2019-08-15 01:04:46 +03:00
Perry Jiang 18f1995d4d Bug 1231213 - Implement cross-process ServiceWorkerGlobalScope.skipWaiting(). r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26175

--HG--
extra : moz-landing-system : lando
2019-08-14 16:20:31 +00:00
Perry Jiang 67fdc5b2fb Bug 1231213 - Implement ServiceWorkerPrivateImpl to dispatch operations to content processes and respond to their results. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26174

--HG--
extra : moz-landing-system : lando
2019-08-14 16:20:24 +00:00
Cosmin Sabou 85a8083871 Backed out 22 changesets (bug 1231213) for build bustages on /mozilla/Attributes.h CLOSED TREE
Backed out changeset 4a45f2c447fd (bug 1231213)
Backed out changeset bcb4d348a847 (bug 1231213)
Backed out changeset ae78ac86cc86 (bug 1231213)
Backed out changeset d681c92a7f05 (bug 1231213)
Backed out changeset 1ac9661e7fb4 (bug 1231213)
Backed out changeset 796c617b989f (bug 1231213)
Backed out changeset c46b31113adb (bug 1231213)
Backed out changeset ea7334da65d9 (bug 1231213)
Backed out changeset 6e9273940bf5 (bug 1231213)
Backed out changeset 7df0e0ff9a82 (bug 1231213)
Backed out changeset 12aba06d169c (bug 1231213)
Backed out changeset e7d6d8d64e8a (bug 1231213)
Backed out changeset 097a29f3ff9a (bug 1231213)
Backed out changeset 1b7169b75760 (bug 1231213)
Backed out changeset 0fd1fd7c3f06 (bug 1231213)
Backed out changeset 3d539eb7faff (bug 1231213)
Backed out changeset 419f9bb7be3c (bug 1231213)
Backed out changeset caede0e4e888 (bug 1231213)
Backed out changeset 778eade5085d (bug 1231213)
Backed out changeset a84b262ff6f8 (bug 1231213)
Backed out changeset 97328368da02 (bug 1231213)
Backed out changeset 9c845d7e3b29 (bug 1231213)
2019-08-14 00:10:48 +03:00
Perry Jiang f4fe39d5e3 Bug 1231213 - Implement cross-process ServiceWorkerGlobalScope.skipWaiting(). r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26175

--HG--
extra : moz-landing-system : lando
2019-08-13 19:56:42 +00:00
Perry Jiang 8ff3d32465 Bug 1231213 - Implement ServiceWorkerPrivateImpl to dispatch operations to content processes and respond to their results. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26174

--HG--
extra : moz-landing-system : lando
2019-08-13 19:56:35 +00:00
Cosmin Sabou f870af790d Backed out 22 changesets (bug 1231213) for build bustages on RemoteWorkerChild.cpp. CLOSED TREE
Backed out changeset 06dba269fcfe (bug 1231213)
Backed out changeset 20b1ec70a6d0 (bug 1231213)
Backed out changeset be99adfb84ab (bug 1231213)
Backed out changeset 8cb30e5ef8d7 (bug 1231213)
Backed out changeset bdeff3d76292 (bug 1231213)
Backed out changeset 783bd2856798 (bug 1231213)
Backed out changeset e52869704d4d (bug 1231213)
Backed out changeset df97ea0bbe79 (bug 1231213)
Backed out changeset 822ade495b97 (bug 1231213)
Backed out changeset 06281fe76994 (bug 1231213)
Backed out changeset c8c1d3aa27c6 (bug 1231213)
Backed out changeset b96a12cd2c73 (bug 1231213)
Backed out changeset a1dcf2ea83be (bug 1231213)
Backed out changeset 6e2934410f95 (bug 1231213)
Backed out changeset d4ffae32539b (bug 1231213)
Backed out changeset d99f2cbe0ed2 (bug 1231213)
Backed out changeset 3bbea49c6d03 (bug 1231213)
Backed out changeset dac29b0340ce (bug 1231213)
Backed out changeset 0591a2a0cc41 (bug 1231213)
Backed out changeset afc3b2b9d472 (bug 1231213)
Backed out changeset 89fffd7b8740 (bug 1231213)
Backed out changeset 30b9a65a6294 (bug 1231213)
2019-08-13 21:30:20 +03:00
Perry Jiang 5239719800 Bug 1231213 - Implement cross-process ServiceWorkerGlobalScope.skipWaiting(). r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26175

--HG--
extra : moz-landing-system : lando
2019-08-13 04:57:44 +00:00
Perry Jiang 8089eeb912 Bug 1231213 - Implement ServiceWorkerPrivateImpl to dispatch operations to content processes and respond to their results. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26174

--HG--
extra : moz-landing-system : lando
2019-08-13 05:15:25 +00:00
Narcis Beleuzu f53affe1cb Backed out 22 changesets (bug 1231213) for build bustages on RemoteWorkerChild.cpp . CLOSED TREE
Backed out changeset 6f25a7e73fe2 (bug 1231213)
Backed out changeset 5e88c3855fb6 (bug 1231213)
Backed out changeset a78d7b3e44af (bug 1231213)
Backed out changeset eb7f3a9b0a42 (bug 1231213)
Backed out changeset 87575a180ad5 (bug 1231213)
Backed out changeset 4e8369314e87 (bug 1231213)
Backed out changeset 039c34bc043c (bug 1231213)
Backed out changeset 0528ab68d94e (bug 1231213)
Backed out changeset 670e7d61d95c (bug 1231213)
Backed out changeset d61b9d65bd0a (bug 1231213)
Backed out changeset 9042ea694d40 (bug 1231213)
Backed out changeset bc0607e0d50b (bug 1231213)
Backed out changeset 196ee18781cb (bug 1231213)
Backed out changeset 4b588dec466b (bug 1231213)
Backed out changeset be6031a6fca7 (bug 1231213)
Backed out changeset 12e04c22f52f (bug 1231213)
Backed out changeset fd146f327f2d (bug 1231213)
Backed out changeset f2af7b66f50d (bug 1231213)
Backed out changeset 71d93fc98d3f (bug 1231213)
Backed out changeset 280271806864 (bug 1231213)
Backed out changeset ca4e828345a2 (bug 1231213)
Backed out changeset e41b984510ad (bug 1231213)
2019-08-13 07:47:05 +03:00
Perry Jiang 8809a0886e Bug 1231213 - Implement cross-process ServiceWorkerGlobalScope.skipWaiting(). r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26175

--HG--
extra : moz-landing-system : lando
2019-08-13 04:04:23 +00:00
Perry Jiang 8937d778cd Bug 1231213 - Implement ServiceWorkerPrivateImpl to dispatch operations to content processes and respond to their results. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26174

--HG--
extra : moz-landing-system : lando
2019-08-13 04:04:16 +00:00