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

1307 Коммитов

Автор SHA1 Сообщение Дата
Gijs Kruitbosch 27039e2946 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 08:18:51 +00:00
Ryan Hunt 3ebced7e17 Bug 1761257 - wasm: Update interface tests for exception handling shipping. r=yury
Differential Revision: https://phabricator.services.mozilla.com/D142008
2022-03-25 15:35:38 +00:00
Matthew Gaudet 6450bc232b Bug 1759597 - Enable WritableStreams and pipeTo by default r=smaug
* TextEncoder stream tests now fail, rather than error
* WritableStreams are exosed on worker interfacess now; and broken-then is fixed too
* Fix interface semantics

Differential Revision: https://phabricator.services.mozilla.com/D141125
2022-03-22 20:33:04 +00:00
Emilio Cobos Álvarez 2b25e0298a Bug 1758702 - Avoid including RemoteWorkerChild in WorkerPrivate.h. r=asuth
This avoids having to include PRemoteBrowser* headers etc, which are not
exported otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D140659
2022-03-17 19:06:51 +00:00
criss 9302fa739c Backed out 2 changesets (bug 1758702) for causing build bustages. CLOSED TREE
Backed out changeset 3e00d9203851 (bug 1758702)
Backed out changeset 66625baf0875 (bug 1758702)
2022-03-17 15:21:31 +02:00
Emilio Cobos Álvarez dd7770da6c Bug 1758702 - Avoid including RemoteWorkerChild in WorkerPrivate.h. r=asuth
This avoids having to include PRemoteBrowser* headers etc, which are not
exported otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D140659
2022-03-17 12:15:20 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Matthew Gaudet 4186ebdfcc Bug 1759605 - Expose missing ReadableStream interfaces (as defined by WebIDL) r=saschanaz,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D141126
2022-03-16 15:28:03 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Jens Stutte 83ea317854 Bug 1262224: Enable test_cross_origin_url_after_redirect.html. r=dom-worker-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D140944
2022-03-14 11:51:54 +00:00
Mark Banner 8bb4667fae Bug 1758474 - Implement an ESLint rule to disallow passing {} as the target parameter for ChromeUtils.import. r=Gijs,mossop,perftest-reviewers,preferences-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140517
2022-03-11 16:41:29 +00:00
Emilio Cobos Álvarez 8e81f196b9 Bug 1758705 - Make origin trials in workers work. r=asuth,dom-worker-reviewers
(pun intended)

Snapshot the trials at worker creation time, which should be enough for
our purposes.

Differential Revision: https://phabricator.services.mozilla.com/D140660
2022-03-11 11:05:09 +00:00
smolnar e89faa903f Backed out changeset 5018856d8fee (bug 1758474) for causing node eslint failure. CLOSED TREE 2022-03-10 11:58:45 +02:00
Mark Banner fe937b78bd Bug 1758474 - Implement an ESLint rule to disallow passing {} as the target parameter for ChromeUtils.import. r=Gijs,mossop,perftest-reviewers,preferences-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140517
2022-03-10 09:25:28 +00:00
Nika Layzell 82a6eea4e8 Bug 1751948 - Part 7: Fix non-unified filename conflict between generated and non-generated ChannelInfo.cpp files, r=asuth
Due to the earlier changes in this patch series, we now build IPDL files
within the directories which they're declared in, meaning that the
generated ChannelInfo.cpp file made by ChannelInfo.ipdlh will try to
compile a ChannelInfo.o file on top of ChannelInfo.cpp's ChannelInfo.o
file when building in non-unified mode.

This works around the issue by renaming the ipdlh file to
IPCChannelInfo.ipdlh.

Differential Revision: https://phabricator.services.mozilla.com/D138567
2022-02-28 21:01:49 +00:00
Eden Chuang e06a90c8d7 Bug 1754365 - Saving NavigationPreload's PerformanceTimingData into worker's PerformanceStorage. r=dom-worker-reviewers,jesup
Depends on D138251

Differential Revision: https://phabricator.services.mozilla.com/D138252
2022-02-27 00:26:22 +00:00
Eden Chuang 2c0fec1d03 Bug 1754365 - Create IPC for transferring NavigationPreload's PerformanceTimingData. r=dom-worker-reviewers,jesup
Depends on D138250

Differential Revision: https://phabricator.services.mozilla.com/D138251
2022-02-27 00:26:22 +00:00
Marian-Vasile Laza af4995d8ba Backed out 4 changesets (bug 1754365) for causing wpt failures on service-worker/navigation-headers.https.html. CLOSED TREE
Backed out changeset 9ee546b9fd2b (bug 1754365)
Backed out changeset cf972fe0d961 (bug 1754365)
Backed out changeset f8afd25bf41e (bug 1754365)
Backed out changeset 34d4e99f8219 (bug 1754365)
2022-02-26 01:51:59 -08:00
Eden Chuang d3aabddeb0 Bug 1754365 - Saving NavigationPreload's PerformanceTimingData into worker's PerformanceStorage. r=dom-worker-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D138252
2022-02-26 08:40:26 +00:00
Eden Chuang abba984a19 Bug 1754365 - Create IPC for transferring NavigationPreload's PerformanceTimingData. r=dom-worker-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D138251
2022-02-26 08:40:26 +00:00
Kagami Sascha Rosylight 4691a13522 Bug 1734243 - Part 3: Use SetAnyPromiseIsHandled in ServiceWorkerScriptCache r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D139592
2022-02-25 20:11:41 +00:00
Sylvestre Ledru 98949ee751 Bug 1754767 - Remove duplicate includes r=media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D138441
2022-02-11 10:01:15 +00:00
Karl Dubost e8a8c45314 Bug 1637922. Disables netinfo in some tests. r=annevk,webidl,peterv
Adds comment on keeping the code instead of removing it.

Differential Revision: https://phabricator.services.mozilla.com/D126447
2022-02-10 05:52:38 +00:00
Randell Jesup c5706e1941 Bug 1752387: Don't use a timer for recording ServiceWorker running telemetry r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D137600
2022-02-09 20:03:15 +00:00
Nika Layzell dabb46c84d Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8
The changes to ipdl actors were mechanical, and largely automated using
a script.

Differential Revision: https://phabricator.services.mozilla.com/D137237
2022-02-09 17:29:47 +00:00
Nika Layzell 91ec85c593 Bug 1752444 - Part 2: Rewrite direct_call.py protocols to use {Parent,Child}Impl attributes, r=ipc-reviewers,media-playback-reviewers,alwu,mccr8
This is a mechanical change which was performed by a script based on the
contents of direct_call.py, and then manually checked over to fix
various rewriting bugs caused by my glorified sed script. See the
previous part for more context on the change.

Differential Revision: https://phabricator.services.mozilla.com/D137227
2022-02-09 17:29:46 +00:00
Eden Chuang b7678a86ba Bug 1750515 - Enable NavigationPreload API on Nightly. r=dom-worker-reviewers,smaug
Depends on D137599

Differential Revision: https://phabricator.services.mozilla.com/D136215
2022-02-09 07:14:26 +00:00
Nika Layzell 486c5fc2c4 Bug 1751071 - Correctly forward-declare/import included but unused types in ipdlh headers, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D137164
2022-02-08 23:53:44 +00:00
Marian-Vasile Laza a9f8213954 Backed out 3 changesets (bug 1750515, bug 1753025) for causing wpt failures on idlharness.https.any... CLOSED TREE
Backed out changeset 9771e7cbe148 (bug 1750515)
Backed out changeset f671d5206b88 (bug 1753025)
Backed out changeset 99bacb6a3d92 (bug 1753025)
2022-02-09 00:10:47 +02:00
Eden Chuang 0430fc154e Bug 1750515 - Enable NavigationPreload API on Nightly. r=dom-worker-reviewers,smaug
Depends on D137599

Differential Revision: https://phabricator.services.mozilla.com/D136215
2022-02-08 18:12:34 +00:00
criss e81e5f0c57 Backed out changeset 068ad1f32fba (bug 1752387) for causing failures on nsISupportsImpl.cpp:43. CLOSED TREE 2022-02-08 19:46:20 +02:00
Randell Jesup 74757b0430 Bug 1752387: Don't use a timer for recording ServiceWorker running telemetry r=chutten,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D137600
2022-02-08 16:21:01 +00:00
criss e40ae5e2cc Backed out 3 changesets (bug 1637922) for causing failures on test_worker_interfaces.html. CLOSED TREE
Backed out changeset 6676088e5fdf (bug 1637922)
Backed out changeset 469353b7c340 (bug 1637922)
Backed out changeset e9ffc2ed8f4d (bug 1637922)
2022-02-08 18:28:53 +02:00
criss 3b218d4269 Backed out 3 changesets (bug 1753025, bug 1750515) for causing build bustages on Logging.h
Backed out changeset c07607b89a61 (bug 1750515)
Backed out changeset 09f9724c8c1c (bug 1753025)
Backed out changeset 90e9e803f010 (bug 1753025)
2022-02-08 17:52:43 +02:00
Karl Dubost 6d0ce643f6 Bug 1637922. Disables netinfo in some tests. r=annevk,webidl,peterv
Adds comment on keeping the code instead of removing it.

Differential Revision: https://phabricator.services.mozilla.com/D126447
2022-02-08 15:02:33 +00:00
Eden Chuang f78aaff856 Bug 1750515 - Enable NavigationPreload API on Nightly. r=dom-worker-reviewers,smaug
Depends on D137599

Differential Revision: https://phabricator.services.mozilla.com/D136215
2022-02-08 11:01:22 +00:00
Andreea Pavel 290d073bd8 Bug 1749068 - disable test_hsts_upgrade_intercept.html and test_cache_worker_gc.html to reduce failure rate r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D137964
2022-02-08 07:46:47 +00:00
Chris Peterson 2ae60bead7 Bug 1744425 - Replace nsContentUtils::GenerateUUID() to nsID::GenerateUUID(). r=nika
Bug 1723674 added a new nsID::GenerateUUID() static factory function to generate UUIDs without the overhead of querying and instantiating an nsIUUIDGenerator object. nsContentUtils::GenerateUUID() is a utility function that amortizes that overhead by holding an nsIUUIDGenerator singleton. That's no longer necessary because code that calls nsContentUtils::GenerateUUID() can now just call nsID::GenerateUUID(). No nsIUUDGenerator is needed.

Differential Revision: https://phabricator.services.mozilla.com/D132866
2022-02-03 04:39:34 +00:00
Ryan Hunt d4d2cb3a35 Bug 1750040 - wasm: Enable wasm exception handling in nightly. r=lth
Differential Revision: https://phabricator.services.mozilla.com/D136630
2022-01-31 15:03:52 +00:00
Randell Jesup a644a63dcd Bug 1752405: minor cleanup for ServiceWorkers r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D137196
2022-01-28 16:43:02 +00:00
Eden Chuang 735ed80806 Bug 1744025 - Adding FetchEvent.mHandled FetchEvent.mPreloadResponse into CycleCollection checking. r=dom-worker-reviewers,smaug
Since these promises are also holding the GlobalObject(ServiceWorkerGlobalScope), they are needed to be added into the CycleCollection checking.
Otherwise, ServiceWorkerGlobalScope can not be unrooted as expected.

Depends on D133483

Differential Revision: https://phabricator.services.mozilla.com/D136776
2022-01-25 08:53:03 +00:00
Eden Chuang 2266b31d41 Bug 1744025 - Replace include "mozilla/dom/WorkerPrivate.h" with include "mozilla/dom/WorkerScope.h" where WorkerPrivate->GlobalScope() is called. r=dom-worker-reviewers,smaug,jstutte
#include "mozilla/dom/WorkerScope.h" is removed from WorkerPrivate.h, where calling WorkerPrivate::GlobalScope() without include "WorkerScope.h" makes WorkerScope as an incomplete type.


Depends on 132800

Depends on D132800

Differential Revision: https://phabricator.services.mozilla.com/D133483
2022-01-25 08:53:03 +00:00
Matthew Gaudet bc10b96605 Bug 1748888 - Add ErrorResult parameter to PromiseNativeHandler callbacks r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136423
2022-01-20 19:11:39 +00:00
Jens Stutte a3884ad516 Bug 1741182: Harmonize WorkerRunnable derived classes' overrides of Cancel. r=dom-worker-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D135679
2022-01-12 14:43:09 +00:00
Norisz Fay 07f4785fb5 Backed out changeset 582722ee7fc8 (bug 1112134) for causing xpcshell failures on test_originInit.js CLOSED TREE 2022-01-10 17:18:28 +02:00
Kagami Sascha Rosylight ca78e92b7c Bug 1112134 - Limit Cache/CacheStorage to SecureContext r=edenchuang,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D134560
2022-01-10 14:36:12 +00:00
Eden Chuang c6373c4a26 Bug 1725567 - P6 Resolve preload response promise with NetworkError response in FetchEventOpProxy::ActorDestroy. r=dom-worker-reviewers,jesup
Depends on D130183

Differential Revision: https://phabricator.services.mozilla.com/D133192
2022-01-04 14:42:36 +00:00
Eden Chuang 02e83cbd20 Bug 1725567 - P5 Support canceling fetching which launched by FetchService. r=dom-worker-reviewers,jesup
Cancel the navigation preload fetching while the FetchEvent has already received Recvdelete or RecvRespondWith

Depends on D129809

Differential Revision: https://phabricator.services.mozilla.com/D130183
2022-01-04 14:42:35 +00:00
Eden Chuang 7245366e6f Bug 1725567 - P2 FetchService interface declaration. r=dom-worker-reviewers,jesup
This patch defines the interface of FetchService for its consumers.

RefPtr<FetchServiceResponsePromise>&& FetchService::Fetch(SafeRefPtr<InternalRequest> aRequest);

FetchService is a singleton object in the parent process main thread, which is used for managing all the requested fetching created by FetchService.
It would also support more control capability, such as abort or cancel, and also observers for shutdown or other cases. These would be implemented in the following patches.

FetchInstance is an internal representation for each fetching.

Depends on D128465

Differential Revision: https://phabricator.services.mozilla.com/D128223
2022-01-04 14:42:34 +00:00
Eden Chuang d96d9736dd Bug 1725567 - P1 Create InternalRequest from channel and set its Service-Worker-Navigation-Preload header. r=dom-worker-reviewers,ytausky
This patch creates the InternalRequest and sets its Service-Worker-Navigation-Preload header according to the spec step 7.1 and step 7.4

The created InternalRequest is used for passing into FetchService to perform fetch in the parent process for NavigationPreload API.

Differential Revision: https://phabricator.services.mozilla.com/D128465
2022-01-04 14:42:33 +00:00
Csoregi Natalia 38b8ae2fb3 Backed out changeset 2429b99637c7 (bug 1746110) for causing Bug 1747431. CLOSED TREE 2022-01-01 18:59:15 +02:00
Eden Chuang 8038e4f22d Bug 1730689 - FetchEvent.mRespondWithHandler could be nullptr when self dispatching events in ServiceWorker. r=dom-worker-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D133897
2021-12-21 15:46:16 +00:00
Gijs Kruitbosch b095cb0969 Bug 1747065 - remove plugin.load_flash_only setters which are no-ops r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D134398
2021-12-21 14:34:48 +00:00
Eden Chuang e733f56e1d Bug 1740551 - Do not perform navigation fault mitigation when the ServiceWorkerRegistrationInfo::mUnregistered is true. r=dom-worker-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D134384
2021-12-21 12:29:37 +00:00
Andrew Osmond 15cb038426 Bug 1746110 - Turn on OffscreenCanvas in nightly only by default. r=gfx-reviewers,emilio,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D133935
2021-12-21 02:14:44 +00:00
Jens Stutte 06cc8424d6 Bug 1602393: Rename mRunnableDispatched to mSaveDataRunnableDispatched and crash on shutdown message dispatch failure in ServiceWorkerRegistrar r=dom-worker-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D134305
2021-12-20 19:19:04 +00:00
Luca Greco fe9a6a9fa6 Bug 1728327 - Introduce a new nsIServiceWorkerManager.wakeForExtensionAPIEvent method. r=asuth
This patch includes a set of changes to the ServiceWorker internals to introduce a new
nsIServiceWorkerManager.wakeForExtensionAPIEvent method, to be used by the WebExtensions internals
to request an active background service worker to be spawned (if it is not yet) in response to
a WebExtension API event.

The new method gets as parameters:

- the scope URL for the extension background service worker to spawn
- WebExtensions API namespace and API event name which we are going to spawn an active worker for

and return a promise which would be:
- rejected if the worker could not be spawned
- resolved to a boolean if the worker was spawned successfully (or already running)

The value of the boolean value resolved is meant to represent if the worker did actually
have any listener subscribed for the given WebExtensions API event listener
(which the WebExtensions internals may then use to decide if it is worth to send that event
to be handled by the worker script or not).

In this patch the ExtensionBrowser::HasWakeupEventListener used to determine if an WebExtensions
API event was subscribed syncronously when the worker was being loaded is not implemented yet
and it is always returning false (a proposed implementation for that method is going to be
added in a separate patch part of this same bugzilla issue).

A unit test for the new proposed nsIServiceWorkerManager method is also part of a separate patch
(attached to this bugzilla issue as the child revision for this one).

Differential Revision: https://phabricator.services.mozilla.com/D130756
2021-12-15 18:29:36 +00:00
Norisz Fay 5edb88e27a Backed out 9 changesets (bug 1744025) for causing wpt failures on CheckedUnsafePtr.h CLOSED TREE
Backed out changeset 89dca4fc5940 (bug 1744025)
Backed out changeset 7aa395dcdbe4 (bug 1744025)
Backed out changeset 1580a4ea1a85 (bug 1744025)
Backed out changeset af171636a87f (bug 1744025)
Backed out changeset a5edfa1c9cd6 (bug 1744025)
Backed out changeset 8abd6ba69815 (bug 1744025)
Backed out changeset cfb822df5b3f (bug 1744025)
Backed out changeset 5598943a94fd (bug 1744025)
Backed out changeset 43186fbbf8b4 (bug 1744025)
2021-12-15 18:46:01 +02:00
Eden Chuang 4146950108 Bug 1744025 - Replace include "mozilla/dom/WorkerPrivate.h" with include "mozilla/dom/WorkerScope.h" where WorkerPrivate->GlobalScope() is called. r=dom-worker-reviewers,smaug,jstutte
#include "mozilla/dom/WorkerScope.h" is removed from WorkerPrivate.h, where calling WorkerPrivate::GlobalScope() without include "WorkerScope.h" makes WorkerScope as an incomplete type.


Depends on 132800

Depends on D132800

Differential Revision: https://phabricator.services.mozilla.com/D133483
2021-12-15 13:48:19 +00:00
Gabriele Svelto e2286f8bbf Bug 1745950 - Remove the string-based KeepAliveIfHasListenersFor() implementation and convert all callers to use the atoms-based one instead r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D133748
2021-12-14 16:54:50 +00:00
Dragana Damjanovic 1fd7957fc0 Bug 1744006 - Replace dom.securecontext.whitelist_onions with dom.securecontext.allowlist_onions and dom.securecontext.whitelist with dom.securecontext.allowlist r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D133660
2021-12-14 05:20:08 +00:00
Andrew Osmond 1db42536a0 Bug 1736177 - Part 4. Expose missing WebGL interfaces to workers. r=dom-worker-reviewers,jgilbert,smaug
Differential Revision: https://phabricator.services.mozilla.com/D130780
2021-12-10 02:57:53 +00:00
Randell Jesup dfc0dea63a Bug 1740335: Add telemetry for the number of service workers r=dom-worker-reviewers,edenchuang
We want to record the number of registered and running ServiceWorkers, and
subset them by whether they support Fetch or not, in order to inform
decisions about isolating ServiceWorkers.
Also reenables some of the other ServiceWorker telemetry we used to collect
until FF 102

Differential Revision: https://phabricator.services.mozilla.com/D131563
2021-12-09 12:58:50 +00:00
Randell Jesup 5692170260 Bug 1704133 - Removing stale probe sw.synthesized_res_count r=jstutte
Landed by jesup

Differential Revision: https://phabricator.services.mozilla.com/D133152
2021-12-08 15:14:18 +00:00
criss c42f2bb9cc Backed out changeset 8d0d6a0dadb4 (bug 1740335) for causing mochitest failures on ServiceWorkerPrivateImpl.h. CLOSED TREE 2021-12-08 15:24:27 +02:00
Randell Jesup c55f410901 Bug 1740335: Add telemetry for the number of service workers r=dom-worker-reviewers,edenchuang
We want to record the number of registered and running ServiceWorkers, and
subset them by whether they support Fetch or not, in order to inform
decisions about isolating ServiceWorkers.
Also reenables some of the other ServiceWorker telemetry we used to collect
until FF 102

Differential Revision: https://phabricator.services.mozilla.com/D131563
2021-12-08 11:50:55 +00:00
Cosmin Sabou fdf40d5a31 Backed out changeset 1778ca2ab291 (bug 1744425) for bc failures on browser_xpcom_graph_wait.js. CLOSED TREE 2021-12-08 07:20:54 +02:00
Chris Peterson aae95e46eb Bug 1744425 - Replace nsContentUtils::GenerateUUID() to nsID::GenerateUUID(). r=nika
Bug 1723674 added a new nsID::GenerateUUID() static factory function to generate UUIDs without the overhead of querying and instantiating an nsIUUIDGenerator object. nsContentUtils::GenerateUUID() is a utility function that amortizes that overhead by holding an nsIUUIDGenerator singleton. That's no longer necessary because code that calls nsContentUtils::GenerateUUID() can now just call nsID::GenerateUUID(). No nsIUUDGenerator is needed.

Differential Revision: https://phabricator.services.mozilla.com/D132866
2021-12-08 03:19:11 +00:00
Alexandru Michis c721646bbb Backed out changeset bb6962712184 (bug 1740335) for causing xpcshell failures in test_ext_background_service_worker.js
CLOSED TREE
2021-12-07 00:21:03 +02:00
Randell Jesup b97c90d0de Bug 1740335: Add telemetry for the number of service workers r=dom-worker-reviewers,edenchuang
We want to record the number of registered and running ServiceWorkers, and
subset them by whether they support Fetch or not, in order to inform
decisions about isolating ServiceWorkers.
Also reenables some of the other ServiceWorker telemetry we used to collect
until FF 102

Differential Revision: https://phabricator.services.mozilla.com/D131563
2021-12-06 21:06:54 +00:00
criss b8de8f45dd Backed out changeset 5ed325ce740b (bug 1740335) for causing serviceworker related failures. CLOSED TREE 2021-12-02 17:24:08 +02:00
Randell Jesup a5f65e1e44 Bug 1740335: Add telemetry for the number of service workers r=dom-worker-reviewers,edenchuang
We want to record the number of registered and running ServiceWorkers, and
subset them by whether they support Fetch or not, in order to inform
decisions about isolating ServiceWorkers.
Also reenables some of the other ServiceWorker telemetry we used to collect
until FF 102

Differential Revision: https://phabricator.services.mozilla.com/D131563
2021-12-02 14:26:56 +00:00
Tim Huang e3e09e1fdf Bug 1731999 - Part 3: Enable partitioned service workers. r=pbz
This patch enables partitioned service workers in third-party contexts.
Doesn't like before, we will allow service workers to be registered even
the third-party contexts don't have storage access and the registered
service workers will be partitioned by the top-level site.

You can control this by using the pref 'privacy.partition.serviceWorkers'.
Setting this to true will enable the partitioning, otherwise, it will
still use the old behavior.

Differential Revision: https://phabricator.services.mozilla.com/D131788
2021-11-30 13:40:31 +00:00
Tim Huang bf00e6e2cf Bug 1731999 - Part 2: Use regular principal for service workers if pref 'privacy.partition.serviceWorkers' is false. r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D131787
2021-11-30 13:40:31 +00:00
Andreea Pavel f8786231c4 Bug 1615164 - disable test_abrupt_completion.html on win10 2004 r=intermittent-reviewers,gbrown DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D132246
2021-11-26 16:37:04 +00:00
Tim Huang 8f9ee3f20e Bug 1731990 - Part 4: Populate the partitionKey from the prinicpal of the service worker in ServiceWorkerScriptCache. r=asuth
This patch changes ServiceWorkerScriptCache to use the principal of the
service worker to populate the partitionKey to the cookieJarSettings.
The service workers are using foreign partitioned principal. This means
it will contain a correct partitionKey if it's in a third-party context.
So we can use it to populate the partitionKey. In the first-party
context, we can use the script uri to get the partionKey, which is the
original approach.

Differential Revision: https://phabricator.services.mozilla.com/D128734
2021-11-25 13:11:35 +00:00
Tim Huang 7ff4cf104f Bug 1731990 - Part 3: Use the partitionKey from the foreign partitioned principal in ServiceWorkerPrivate. r=pbz,dom-storage-reviewers,edenchuang
We used to use the principal URL for the partitionKey in
ServiceWorkerPrivateImpl. This is correct if the ServiceWorker only
works in first-party context. But, it isn't correct in third-party
context.

To fix that, we can directly use the foreign paritioned principal from
the ServiceWorkerPrivate to get the partitionKey in third-party context.
For the first-party context, we can still use the original approach to
get the partitionKey.

Differential Revision: https://phabricator.services.mozilla.com/D128733
2021-11-25 13:11:35 +00:00
Tim Huang bdeaf4cf23 Bug 1731990 - Part 2: Using foreignPartitionedPrincipal in ServiceWorkerContainer. r=asuth
The patch modifies ServiceWorkerContainer::GetScopeForUrl() to use the
foreign partitioned principal.

Differential Revision: https://phabricator.services.mozilla.com/D128732
2021-11-25 13:11:34 +00:00
Tim Huang fdc08933ea Bug 1731990 - Part 1: Using ForeignPartitionedPrincipal in ServiceWorkerInterceptController. r=asuth
This patch changes to use the foreign partitioned principal when check
if a channel needs to be intercepted by a certain service worker.

Differential Revision: https://phabricator.services.mozilla.com/D128731
2021-11-25 13:11:34 +00:00
Tim Huang e9fcc1c87e Bug 1731982 - Part 10: Populate IsThirdPartyContextToTopWindow to WorkerPrivate. r=asuth
To know if a worker is created under a third-party context, we need to
populate the `IsThirdPartyContextToTopWindow` to WorkerPrivate. This is
needed to get the correct foreign partitioned prinipal when loading
worker script in the content processes.

Differential Revision: https://phabricator.services.mozilla.com/D129059
2021-11-25 13:11:33 +00:00
Tim Huang 6d96956b62 Bug 1731982 - Part 9: Add a test to ensure that the dedicated/shared worker can be intercepted by a service worker. r=asuth
The test verifies that if a dedicated/shared worker can be intercepted by a
service worker.

Differential Revision: https://phabricator.services.mozilla.com/D129058
2021-11-25 13:11:32 +00:00
Tim Huang e65d0db962 Bug 1731982 - Part 5: Using foreign partitioned principal when creating clientSource in ServiceWorkerManager. r=asuth
Currently, the ServiceWorkerManager creates a content prinipcal based
on the regular originAttributes when dispatch the fetch event. This
patch changes to use the foreign partitioned originAttributs.

Note that we don't add tests for this because the change doesn't change
the behavior. And we don't enable partitioned third-party Service Worker.
So, the existing test cases is enough for this.

Differential Revision: https://phabricator.services.mozilla.com/D127632
2021-11-25 13:11:31 +00:00
Kagami Sascha Rosylight 6e4823016d Bug 1740044 - Enable Web Locks by default r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D132100
2021-11-25 02:19:44 +00:00
Yaron Tausky c24bfb26ba Bug 1577346 - Convert between stream types for preload response r=dom-worker-reviewers,edenchuang
A previous patch added code paths that propagate the preload response
from the parent process's main thread to the service worker in the
content process, but left out the conversions between different stream
types. This commit adds these conversions.

Based on D122822.

Differential Revision: https://phabricator.services.mozilla.com/D131380
2021-11-22 14:09:24 +00:00
Yaron Tausky 83bb5d45cd Bug 1741493 - Split IPCInternalResponse r=nika
This commit replaces IPCInternalResponse with three different structs:
ParentToParentInternalResponse, ParentToChildInternalResponse, and
ChildToParentInternalResponse. Doing this lets us convert runtime
checks into compile-time type checks and simplifies relevant code.

Differential Revision: https://phabricator.services.mozilla.com/D131275
2021-11-19 16:45:19 +00:00
Niklas Goegge 5d592a6adb Bug 1617611: Annotate each failing test individually. r=webdriver-reviewers,necko-reviewers,ckerschb,whimboo,valentin
Annotating each test individually lets us avoid introducing new failing tests
while we go through the backlog of failing tests.

Depends on D129162

Differential Revision: https://phabricator.services.mozilla.com/D129163
2021-11-17 11:04:34 +00:00
criss 507f143b88 Backed out 2 changesets (bug 1617611) for causing mochitest failures on storageAccessWithDynamicFpi.js. CLOSED TREE
Backed out changeset fdb2c6bfc0c6 (bug 1617611)
Backed out changeset c3352f4b3681 (bug 1617611)
2021-11-16 13:02:05 +02:00
Niklas Goegge 5b684c7fc6 Bug 1617611: Annotate each failing test individually. r=webdriver-reviewers,necko-reviewers,ckerschb,whimboo,valentin
Annotating each test individually lets us avoid introducing new failing tests
while we go through the backlog of failing tests.

Depends on D129162

Differential Revision: https://phabricator.services.mozilla.com/D129163
2021-11-16 10:15:45 +00:00
Tim Huang 10b6c9dc96 Bug 1737670 - Part 4: Skip xorigin test for dFPI in serviceworkers. r=asuth
Currently, the third-party service worker is disabled in dFPI. So, it
makes no sense to run xorigin tests for dFPI.

Differential Revision: https://phabricator.services.mozilla.com/D130891
2021-11-11 13:08:54 +00:00
Tim Huang f1dbf2ae1c Bug 1737670 - Part 3: Moving tests that are not compatible with dFPI to mochitest.ini from mochitest-common.init. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D130747
2021-11-11 13:08:53 +00:00
Tim Huang 8d84d89e6a Bug 1737670 - Part 2: Add ini files for testing service worker tests with dFPI. r=asuth
Depends on D130745

Differential Revision: https://phabricator.services.mozilla.com/D130746
2021-11-11 13:08:53 +00:00
Tim Huang 13fcc15528 Bug 1737670 - Part 1: Convert the existing mochitest ini files to mochitest common ini files in service worker tests. r=asuth
In order to support running service worker tests for dFPI, we first
convert the existing mochitest.ini, chrome.ini and browser.ini to
mochitest-common.ini, chrome-common.ini and browser-common.ini respectively.
And create ini files that import them.

Differential Revision: https://phabricator.services.mozilla.com/D130745
2021-11-11 13:08:52 +00:00
Eden Chuang 600e576e5d Bug 1577346 - P4 IPC implementation for FetchEvent.preloadResponse. r=dom-worker-reviewers,ytausky
This patch implements the IPC for propagating the preload response from the parent process' main thread to the content process' worker thread.

The following is the complicated propagation path.

FetchEventOpChild(Parent process main thread) =>
FetchEventOpParent(Parent process background thread) =>
FetchEventOpProxyParent(Parent process background thread) =>
FetchEventOpProxyChild(content process worker launch thread) =>
ServiceWorker(content process worker thread)

However, since preload response fetching is an asynchronous behavior, the preload response can be ready at any time point during the fetch event dispatching. This patch also handles different situations. Basically, it can be separated into the following stages.

1. Preload response is ready when the fetch event dispatching is in the parent process main thread, which means the fetch event is pending as a ServiceWorkerPrivateImpl::PendingFetchEvent. Details in PendingFetchEvent and FetchEventOpChild

2. Preload response is ready when the fetch event dispatching is in the parent process background thread, which means fetch event is still waiting for worker launching. Details in FetchEventOpParent and FetchEventOpProxyParent.

3. Preload response is ready when constructing the fetch event. Details in FetchEventOpProxyChild and ServiceWorkerOp::FetchEventOp.

Depends on D126244

Differential Revision: https://phabricator.services.mozilla.com/D122821
2021-11-09 20:24:27 +00:00
Kagami Sascha Rosylight 787cfcaeee Bug 1739233 - Add Web Locks interfaces to global exposure tests r=smaug
Depends on D130649

Differential Revision: https://phabricator.services.mozilla.com/D130706
2021-11-09 11:09:05 +00:00
Alexandru Michis 490a04115c Backed out 12 changesets (bug 1731982, bug 1736401) for causing crashes. a=backout
DONTBUILD

Backed out changeset ab85eef8a4fd (bug 1736401)
Backed out changeset 347ce2439936 (bug 1731982)
Backed out changeset fa0ff1505daa (bug 1731982)
Backed out changeset 5b1f2b0a5673 (bug 1731982)
Backed out changeset 4adc65d2f1a3 (bug 1731982)
Backed out changeset a8700204af07 (bug 1731982)
Backed out changeset 88bd00ed8d94 (bug 1731982)
Backed out changeset 80bd8c79b931 (bug 1731982)
Backed out changeset 58ca3a94fec0 (bug 1731982)
Backed out changeset 0b28570dea43 (bug 1731982)
Backed out changeset 23524ce67bb9 (bug 1731982)
Backed out changeset d29cc06a65db (bug 1731982)
2021-11-09 09:23:38 +02:00
Tim Huang de5e12c1b3 Bug 1731982 - Part 10: Populate IsThirdPartyContextToTopWindow to WorkerPrivate. r=asuth
To know if a worker is created under a third-party context, we need to
populate the `IsThirdPartyContextToTopWindow` to WorkerPrivate. This is
needed to get the correct foreign partitioned prinipal when loading
worker script in the content processes.

Differential Revision: https://phabricator.services.mozilla.com/D129059
2021-11-08 14:30:56 +00:00
Tim Huang 37d87edd6d Bug 1731982 - Part 9: Add a test to ensure that the dedicated/shared worker can be intercepted by a service worker. r=asuth
The test verifies that if a dedicated/shared worker can be intercepted by a
service worker.

Differential Revision: https://phabricator.services.mozilla.com/D129058
2021-11-08 14:30:56 +00:00
Tim Huang a22cccc518 Bug 1731982 - Part 5: Using foreign partitioned principal when creating clientSource in ServiceWorkerManager. r=asuth
Currently, the ServiceWorkerManager creates a content prinipcal based
on the regular originAttributes when dispatch the fetch event. This
patch changes to use the foreign partitioned originAttributs.

Note that we don't add tests for this because the change doesn't change
the behavior. And we don't enable partitioned third-party Service Worker.
So, the existing test cases is enough for this.

Differential Revision: https://phabricator.services.mozilla.com/D127632
2021-11-08 14:30:54 +00:00
Eden Chuang 44f5b17747 Bug 1577346 - P3 Make InternalResponse be SafeRefcounted. r=dom-worker-reviewers,ytausky
Depends on D126243

Differential Revision: https://phabricator.services.mozilla.com/D126244
2021-11-08 13:29:32 +00:00
Eden Chuang f5041896b6 Bug 1577346 - P2 Make PFetchEventOpProxy to be refcounted. r=dom-worker-reviewers,asuth
This patch makes IPC protocol PFetchEventOpProxy be refcounted.

Depends on D122448

Differential Revision: https://phabricator.services.mozilla.com/D126243
2021-11-08 13:29:32 +00:00
Eden Chuang 91087af281 Bug 1577346 - P1 Webidl FetchEvent.preloadResponse implementation. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D122448
2021-11-08 13:29:31 +00:00
ssummar 0992acc367 Bug 1603127 - Replaced mozilla::Tuple with std::tuple and applied structured bindings in mozilla/Encoding.h. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D129920
2021-11-08 08:14:00 +00:00
Kagami Sascha Rosylight fffe2b14cb Bug 1738905 - Part 2: Prevent bfcache in SharedWorker r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D129886
2021-11-06 00:06:03 +00:00
Luca Greco 873a724d1c Bug 1728326 - Add GetRegistrationForAddonPrincipal to nsIServiceWorkerManager. r=asuth
This patch introduces a new getRegistrationForAddonPrincipal to nsIServiceWorkerManager.
This method is similar to the existing getRegistrationForPrincipal but:
- similarly to registerForAddonPrincipal it only gets the extension principal as its only
  input parameter.
- unlike getRegistrationForPrincipal, it doesn't throw if the registration has not been found
  (e.g. because it was already unregistered when the method was called).

Differential Revision: https://phabricator.services.mozilla.com/D124702
2021-11-05 21:27:04 +00:00
Marian-Vasile Laza a23f838d22 Backed out 10 changesets (bug 1728326) for causing build bustages. CLOSED TREE
Backed out changeset 39267f23ee63 (bug 1728326)
Backed out changeset 070f187c2005 (bug 1728326)
Backed out changeset f06e0af1bf81 (bug 1728326)
Backed out changeset d21475767077 (bug 1728326)
Backed out changeset 4ca5e36e3c71 (bug 1728326)
Backed out changeset fd700124d69b (bug 1728326)
Backed out changeset 5c8d87c04ac6 (bug 1728326)
Backed out changeset 247504b7ea84 (bug 1728326)
Backed out changeset de8879fc8126 (bug 1728326)
Backed out changeset ebf25d0924d6 (bug 1728326)
2021-11-05 22:48:14 +02:00
Luca Greco 3455869b8b Bug 1728326 - Add GetRegistrationForAddonPrincipal to nsIServiceWorkerManager. r=asuth
This patch introduces a new getRegistrationForAddonPrincipal to nsIServiceWorkerManager.
This method is similar to the existing getRegistrationForPrincipal but:
- similarly to registerForAddonPrincipal it only gets the extension principal as its only
  input parameter.
- unlike getRegistrationForPrincipal, it doesn't throw if the registration has not been found
  (e.g. because it was already unregistered when the method was called).

Differential Revision: https://phabricator.services.mozilla.com/D124702
2021-11-05 20:27:01 +00:00
Cristian Tuns 71486b8924 Backed out changeset 7e8e3747c3f8 (bug 1603127) for causing toolchains build bustages (Bug 1739589). CLOSED TREE 2021-11-05 07:23:45 -04:00
ssummar 508562cc85 Bug 1603127 - Replaced mozilla::Tuple with std::tuple and applied structured bindings in mozilla/Encoding.h. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D129920
2021-11-05 05:33:58 +00:00
Evgenia Kotovich 228e38a58c Bug 1576768 [eslint] Turn on JavaScript linting and formatting rules for .sjs files. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D128483
2021-10-25 11:12:41 +00:00
criss 152f71d4d3 Backed out changeset b60f98f26664 (bug 1576768) for causing mochitest failures. CLOSED TREE 2021-10-22 15:55:50 +03:00
Evgenia Kotovich e29e29aa5a Bug 1576768 [eslint] Turn on JavaScript linting and formatting rules for .sjs files. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D128483
2021-10-22 11:39:46 +00:00
Butkovits Atila e9c58d9073 Merge mozilla-central to autoland. CLOSED TREE 2021-10-20 01:09:10 +03:00
Joel Maher fed2831742 Bug 1727943 - turn on mochitest* tests that were skipped on win10-ccov and now pass. r=MasterWayZ
Differential Revision: https://phabricator.services.mozilla.com/D128817
2021-10-19 20:01:29 +00:00
Butkovits Atila 47821a8f76 Backed out 11 changesets (bug 1731982, bug 1736401) for causing crashes in mozilla::dom::ClientHandle::Control. a=backout
Backed out changeset 83176c86784c (bug 1736401)
Backed out changeset 4826707af5b3 (bug 1731982)
Backed out changeset a748e43fada0 (bug 1731982)
Backed out changeset 49302f7705a4 (bug 1731982)
Backed out changeset 59a5860fd74d (bug 1731982)
Backed out changeset 1f7ec5f62c7c (bug 1731982)
Backed out changeset 3142414872de (bug 1731982)
Backed out changeset 363ae2df245d (bug 1731982)
Backed out changeset ae319f8182ac (bug 1731982)
Backed out changeset 23edbfc8e84a (bug 1731982)
Backed out changeset 5f35364352f0 (bug 1731982)
2021-10-19 22:23:12 +03:00
Tim Huang 8dc576c3d0 Bug 1731982 - Part 6: Using foreign partitioned principal when creating clientSource in ServiceWorkerManager. r=asuth
Currently, the ServiceWorkerManager creates a content prinipcal based
on the regular originAttributes when dispatch the fetch event. This
patch changes to use the foreign partitioned originAttributs.

Note that we don't add tests for this because the change doesn't change
the behavior. And we don't enable partitioned third-party Service Worker.
So, the existing test cases is enough for this.

Differential Revision: https://phabricator.services.mozilla.com/D127632
2021-10-19 06:33:08 +00:00
Cosmin Sabou 49f2f21930 Backed out 10 changesets (bug 1731982) for causing OS X performance test failures and crashes (Bug 1736436). a=backout DONTBUILD
Backed out changeset 48e6f591f699 (bug 1731982)
Backed out changeset 77907884b2fa (bug 1731982)
Backed out changeset a299a2d43ebe (bug 1731982)
Backed out changeset 005801e7cf91 (bug 1731982)
Backed out changeset ef71b02c40cc (bug 1731982)
Backed out changeset a52dd02f2b3f (bug 1731982)
Backed out changeset 50b14ef1eb4a (bug 1731982)
Backed out changeset 80641bdceb6a (bug 1731982)
Backed out changeset ada9e2008ca4 (bug 1731982)
Backed out changeset a208016e9953 (bug 1731982)
2021-10-18 22:18:08 +03:00
Tim Huang eadef6cb18 Bug 1731982 - Part 6: Using foreign partitioned principal when creating clientSource in ServiceWorkerManager. r=asuth
Currently, the ServiceWorkerManager creates a content prinipcal based
on the regular originAttributes when dispatch the fetch event. This
patch changes to use the foreign partitioned originAttributs.

Note that we don't add tests for this because the change doesn't change
the behavior. And we don't enable partitioned third-party Service Worker.
So, the existing test cases is enough for this.

Differential Revision: https://phabricator.services.mozilla.com/D127632
2021-10-18 12:20:33 +00:00
Evgenia Kotovich 0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Noemi Erli 2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Evgenia Kotovich 3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
Cristian Tuns dd44cdf4ef Backed out 10 changesets (bug 1731982) for causing hybrid bustages on nsCORSListenerProxy.obj CLOSED TREE
Backed out changeset a248413c22ec (bug 1731982)
Backed out changeset 1bd7de5d93a1 (bug 1731982)
Backed out changeset d028e1ce1313 (bug 1731982)
Backed out changeset 7db7537bbc24 (bug 1731982)
Backed out changeset 28c18d83906d (bug 1731982)
Backed out changeset 6258b4e10406 (bug 1731982)
Backed out changeset 68bf86b1459c (bug 1731982)
Backed out changeset b8990af2fca2 (bug 1731982)
Backed out changeset 153783261021 (bug 1731982)
Backed out changeset bc9c3abbb8f8 (bug 1731982)
2021-10-15 18:12:21 -04:00
Tim Huang d96cda46f1 Bug 1731982 - Part 6: Using foreign partitioned principal when creating clientSource in ServiceWorkerManager. r=asuth
Currently, the ServiceWorkerManager creates a content prinipcal based
on the regular originAttributes when dispatch the fetch event. This
patch changes to use the foreign partitioned originAttributs.

Note that we don't add tests for this because the change doesn't change
the behavior. And we don't enable partitioned third-party Service Worker.
So, the existing test cases is enough for this.

Differential Revision: https://phabricator.services.mozilla.com/D127632
2021-10-15 20:00:03 +00:00
Alexandru Michis dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Evgenia Kotovich a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +00:00
Cristian Tuns d3df74e295 Backed out 9 changesets (bug 1731982) for causing wpt failures on localStorage. CLOSED TREE
Backed out changeset bbeba8b14a2f (bug 1731982)
Backed out changeset 645cc214c608 (bug 1731982)
Backed out changeset 3a8e2f9c15e8 (bug 1731982)
Backed out changeset 208dd7c57311 (bug 1731982)
Backed out changeset 76a13a728f13 (bug 1731982)
Backed out changeset a6bfce877a86 (bug 1731982)
Backed out changeset 5fc4e33a8232 (bug 1731982)
Backed out changeset 353e3b3e020a (bug 1731982)
Backed out changeset b07167090923 (bug 1731982)
2021-10-13 10:47:25 -04:00
Tim Huang 8822c440f2 Bug 1731982 - Part 6: Using foreign partitioned principal when creating clientSource in ServiceWorkerManager. r=asuth
Currently, the ServiceWorkerManager creates a content prinipcal based
on the regular originAttributes when dispatch the fetch event. This
patch changes to use the foreign partitioned originAttributs.

Note that we don't add tests for this because the change doesn't change
the behavior. And we don't enable partitioned third-party Service Worker.
So, the existing test cases is enough for this.

Differential Revision: https://phabricator.services.mozilla.com/D127632
2021-10-13 11:18:54 +00:00
Noemi Erli cb0b4097d6 Backed out 9 changesets (bug 1731982) for causing Bp-hybrid bustages CLOSED TREE
Backed out changeset 82bb76c2e531 (bug 1731982)
Backed out changeset 8240ef0e1771 (bug 1731982)
Backed out changeset f46f05792c6a (bug 1731982)
Backed out changeset 449c821bc56e (bug 1731982)
Backed out changeset cb813505b5a9 (bug 1731982)
Backed out changeset 06fad8cd9345 (bug 1731982)
Backed out changeset 4b8cf4756686 (bug 1731982)
Backed out changeset 5468bf77f732 (bug 1731982)
Backed out changeset 7800585e3d6a (bug 1731982)
2021-10-12 23:12:19 +03:00
Tim Huang 49ced1a209 Bug 1731982 - Part 6: Using foreign partitioned principal when creating clientSource in ServiceWorkerManager. r=asuth
Currently, the ServiceWorkerManager creates a content prinipcal based
on the regular originAttributes when dispatch the fetch event. This
patch changes to use the foreign partitioned originAttributs.

Note that we don't add tests for this because the change doesn't change
the behavior. And we don't enable partitioned third-party Service Worker.
So, the existing test cases is enough for this.

Differential Revision: https://phabricator.services.mozilla.com/D127632
2021-10-12 18:55:20 +00:00
Molly Howell ec3a2c582a Bug 1724319 - Handle the possibility of the download modal not existing in a test which uses it to cancel a download. r=mtigley
Differential Revision: https://phabricator.services.mozilla.com/D127174
2021-10-01 18:19:46 +00:00
Tom Schuster 5d023856bb Bug 1722576 - Rename PostMessageOptions to StructuredSerializeOptions. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126717
2021-09-29 12:48:17 +00:00
Sandor Molnar fe9f55e2fb Backed out 2 changesets (bug 1722576) for causing wpt failures in structured-clone.any.worker.html
Backed out changeset d31a1c199922 (bug 1722576)
Backed out changeset 4d0e3d6a1960 (bug 1722576)
2021-09-28 22:59:51 +03:00
Tom Schuster 6cec896db2 Bug 1722576 - Rename PostMessageOptions to StructuredSerializeOptions. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126717
2021-09-28 17:09:18 +00:00
Michelle Goossens c159e29e05 Bug 1727943 - Part 2: Migrate mochitest, reftest and crashtest Windows 10 ccov suites from AWS to Azure r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D125350
2021-09-28 15:27:39 +00:00
Jens Stutte 87de42e070 Bug 1726813: Ensure AppShutdown remains in sync with shutdown notifications in the parent process. r=xpcom-reviewers,nika,dom-worker-reviewers,asuth
The goal here is to ensure we can always rely on `AppShutdown::GetShutdownPhase` to be in sync with the "real" application status, mainly this was needed for xpcshell tests to not break if we add assertions on our shutdown state on some global singletons.

We keep the existing observer notification topics but force them (on the parent process) to be issued through the new `advanceShutdownPhase` function of the startup service using the `ShutdownPhase` enum. This way we can synchronize `AppShutdown`'s internal status accordingly.

Some further notes:

  # The `MOZ_ASSERT(AppShutdown::IsNoOrLegalShutdownTopic(aTopic));` in `NotifyObservers` helped a lot to identify missing cases. I think we should keep it in order to stay safe.
  # Introducing the `cenum IDLShutdownPhase` helps to keep the knowledge about the mapping from shutdown phases to observer topics exclusively inside AppShutdown.cpp. Still callers must know what they do in order to choose a proper phase, of course.
  # However we must be aware that `AppShutdown` this way can be kept in sync with the shutdown notifications only in the parent process and that `GetCurrentShutdownPhase` might not give the correct result in child processes. We might want to file a follow up bug that adds some asserts to avoid improper use of `AppShutdown` functions in child processes (but I do not want to make this patch bigger as needed to solve the blocking dependency for bug 1697972).
  # The socket process is one example of a child process that "overloads" shutdown topics. I was wondering if it is the right call to use the very same topic names here to request shutdown to the socket process or if it should have its own topics. Those topics triggered the assert and thus I had to disable it for child processes, for now.
  # This goes together with the more general approach to define process type specific shutdown phases (and hence mappings to topics) as drafted very roughly in bug 1697745.
  # This patch seemed to trigger a known intermittent more often, thus the change here in `ServiceWorkerManager`.

Differential Revision: https://phabricator.services.mozilla.com/D124350
2021-09-15 07:25:29 +00:00
Ryan Hunt 81a19d221d Bug 1721686 - Add test for exposed interfaces on WebAssembly namespace. r=smaug
This commit modifies test_interfaces.js to also test the exposed interfaces
in the WebAssembly namespace. We have conditional features that we'd like
to have confidence that we're not accidentally exposing to web content.

Currently there are:
  * WebAssembly exceptions, enabled only in nightly with a default-off pref
  * mozIntGemm accelerator function, available only in system or addon principals

Depends on D120731

Differential Revision: https://phabricator.services.mozilla.com/D120732
2021-09-09 16:20:07 +00:00
Andreea Pavel fefb88b985 Bug 1717091 - fix disabling typo on a CLOSED TREE 2021-09-07 19:04:15 +03:00
Andreea Pavel 06eab4f635 Bug 1717091 - disable test_hsts_upgrade_intercept.html on win10_2004 not debug r=intermittent-reviewers,bhearsum DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124582
2021-09-07 15:54:17 +00:00
Florian Quèze 998adb18ea Bug 1728760 - require all nsITimerCallback native implementations to also implement nsINamed, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D124349
2021-09-07 08:01:18 +00:00
Steve Fink 464ba9c559 Bug 1727374 - Root Init dictionaries to fix rooting hazards. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D123633
2021-09-02 19:06:58 +00:00
Eden Chuang 902453ab34 Bug 1722502 - P4 Update the test for quota usage mitigation. r=dom-worker-reviewers,asuth
Depends on D122189

Differential Revision: https://phabricator.services.mozilla.com/D122190
2021-08-30 09:24:32 +00:00
Eden Chuang 432ced9589 Bug 1722502 - P3 Quota usage mitigation algorithm implementation. r=dom-worker-reviewers,asuth
This patch introduces ServiceWorkerQuotaUtils.h, which provides helper methods related nsIQuotaManagerService and nsIClearDataService.

QuotaUsageChecker implements the quota usage checking algorithm.

    1. Getting the given origin/group usage through QuotaManagerService. QuotaUsageCheck::Start() implements this step.

    2. Checking if the group usage headroom(gGroupUsageHeadRoom) is satisfied. It could be following three situations. a. Group headroom is satisfied without any usage mitigation. b. Group headroom is satisfied after origin usage mitigation. This invokes nsIClearDataService::DeleteDataFromPrincipal(). c. Group headroom is satisfied after group usage mitigation. This invokes nsIClearDataService::DeleteDataFromBaseDomain().

QuotaUsageChecker::CheckQuotaHeadRoom() implements this step.
If the algorithm is done or error out, the QuotaUsageCheck::mCallback will be called with a bool result for external handling.

Depends on D122188

Differential Revision: https://phabricator.services.mozilla.com/D122189
2021-08-30 09:24:32 +00:00
Eden Chuang 595d12b7cd Bug 1722502 - P2 Provide quota check finishing notification mechanism in ServiceWorker for testing. r=dom-worker-reviewers,asuth
This patch implements a callback mechanism to notify quota usage checking is done.

Depends on D120964

Differential Revision: https://phabricator.services.mozilla.com/D122188
2021-08-30 09:24:32 +00:00
Eden Chuang 780ca9d776 Bug 1722502 - P1 Implement the quota usage checking methods in ServiceWorker for quota usage mitigation. r=dom-worker-reviewers,asuth
This patch implements methods for ServiceWorkerRegistrationInfo to invoke the quota usage checking.

ServiceWorkerRegistrationInfo::CheckQuotaUsage() is an internal using method, such that it is a private method.

Differential Revision: https://phabricator.services.mozilla.com/D120964
2021-08-30 09:24:31 +00:00
criss 2aa1094a66 Backed out 4 changesets (bug 1722502) for causing Hazard bustage on ServiceWorkerQuotaUtils.cpp. CLOSED TREE
Backed out changeset e629eccab130 (bug 1722502)
Backed out changeset 9d8ddf54d9c6 (bug 1722502)
Backed out changeset 2e9d71f4f128 (bug 1722502)
Backed out changeset bbe06a4f707b (bug 1722502)
2021-08-27 10:11:13 +03:00
Eden Chuang 76d6efc88e Bug 1722502 - P4 Update the test for quota usage mitigation. r=dom-worker-reviewers,asuth
Depends on D122189

Differential Revision: https://phabricator.services.mozilla.com/D122190
2021-08-27 05:25:29 +00:00
Eden Chuang 5cfb1772c6 Bug 1722502 - P3 Quota usage mitigation algorithm implementation. r=dom-worker-reviewers,asuth
This patch introduces ServiceWorkerQuotaUtils.h, which provides helper methods related nsIQuotaManagerService and nsIClearDataService.

QuotaUsageChecker implements the quota usage checking algorithm.

    1. Getting the given origin/group usage through QuotaManagerService. QuotaUsageCheck::Start() implements this step.

    2. Checking if the group usage headroom(gGroupUsageHeadRoom) is satisfied. It could be following three situations. a. Group headroom is satisfied without any usage mitigation. b. Group headroom is satisfied after origin usage mitigation. This invokes nsIClearDataService::DeleteDataFromPrincipal(). c. Group headroom is satisfied after group usage mitigation. This invokes nsIClearDataService::DeleteDataFromBaseDomain().

QuotaUsageChecker::CheckQuotaHeadRoom() implements this step.
If the algorithm is done or error out, the QuotaUsageCheck::mCallback will be called with a bool result for external handling.

Depends on D122188

Differential Revision: https://phabricator.services.mozilla.com/D122189
2021-08-27 05:25:29 +00:00
Eden Chuang d7e3349535 Bug 1722502 - P2 Provide quota check finishing notification mechanism in ServiceWorker for testing. r=dom-worker-reviewers,asuth
This patch implements a callback mechanism to notify quota usage checking is done.

Depends on D120964

Differential Revision: https://phabricator.services.mozilla.com/D122188
2021-08-27 05:25:28 +00:00
Eden Chuang 269f6ff9c0 Bug 1722502 - P1 Implement the quota usage checking methods in ServiceWorker for quota usage mitigation. r=dom-worker-reviewers,asuth
This patch implements methods for ServiceWorkerRegistrationInfo to invoke the quota usage checking.

ServiceWorkerRegistrationInfo::CheckQuotaUsage() is an internal using method, such that it is a private method.

Differential Revision: https://phabricator.services.mozilla.com/D120964
2021-08-27 05:25:28 +00:00
Kagami Sascha Rosylight eddf271c1f Bug 1726648 - Add a helper to trim brackets from nsID r=mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D123163
2021-08-23 10:54:11 +00:00
Iulian Moraru a16afaadfe Backed out changeset d21b3f88a2b4 (bug 1726648) for causing build bustages. CLOSED TREE 2021-08-23 04:12:02 +03:00
Kagami Sascha Rosylight 0c5086660f Bug 1726648 - Add a helper to trim brackets from nsID r=mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D123163
2021-08-23 00:35:40 +00:00
Eden Chuang 69e4ba3cbc Bug 1693074 - Adding telemetry for evaluating the duration of fetch event dispatching and response synthesizing. r=dom-worker-reviewers,asuth
This patch tries to record the fetch event dispatching time, the response's synthesizing time, and interception resetting time.

Fetch event dispatching time is the time duration between interception starts, which is the time point of InterceptedHttpChannel::AsyncOpenInternal(), and the fetch handler starts. It includes the InterceptedHttpChannel setup time, ServiceWorker launch time, FetchEventOp propagation through IPC, a FetchEvent creation, initialization, and dispatching/scheduling on worker scope.

Response synthesizing time is the time duration between the fetch handler finishes, which is the resolving/rejecting promise of respondWith(), to the finish of pumping the synthesized response to InterceptedHttpChannel, which is the time point of calling InterceptedHttpChannel::OnStopRequest(). It includes the response propagation through IPC, response header and body synthesis, and pumping synthesized response to the channel.

Interception resetting time is the time duration between the fetch handler finishes and redirecting InterceptedHttpChannel to a normal HTTP channel.

Since the fetch handler is executed on the process where the service worker spawned, the timestamps related to the fetch handler need to be get on that process. So this patch adds the FetchHandlerStart and FetchHandlerFinish on IPCFetchEventRespondWithResult related types to propagate the timestamps to the parent process.

Depends on D118398

Differential Revision: https://phabricator.services.mozilla.com/D118399
2021-08-22 11:02:18 +00:00
Eden Chuang 9d2950b7b1 Bug 1693074 - Adding telemetry for spawning service worker. r=dom-worker-reviewers,asuth
Instead of recording service workers' spawning in InterceptedHttpChannel, recording SERVICE_WORKER_LAUNCH_TIME_2 in ServiceWorkerPrivateImpl since spawning does not happen in fetch only

Depends on D118396

Differential Revision: https://phabricator.services.mozilla.com/D118397
2021-08-22 11:02:17 +00:00
Eden Chuang 43495b894c Bug 1693074 - Remove child interception telemetries related codes. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D118396
2021-08-22 11:02:17 +00:00
Andi-Bogdan Postelnicu 250fa0d795 Bug 1725145 - header files fixes in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122343
2021-08-22 10:21:55 +00:00
Kagami Sascha Rosylight b44f8dfcc2 Bug 1723050 - Part 26: Replace typedef by using in dom/serviceworkers/ r=dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D121324
2021-08-11 14:41:34 +00:00
Marian-Vasile Laza 2ecd487a68 Backed out 2 changesets (bug 1723050) for causing build bustages on WorkerNavigator.h. CLOSED TREE
Backed out changeset 0df5cdd9fe17 (bug 1723050)
Backed out changeset db4915198404 (bug 1723050)
2021-08-11 14:14:20 +03:00
Kagami Sascha Rosylight dbf49e1c62 Bug 1723050 - Part 26: Replace typedef by using in dom/serviceworkers/ r=dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D121324
2021-08-11 09:10:25 +00:00
Luca Greco 0e80e53717 Bug 1724061 - Make ServiceWorkerManager::PropagateUnregister to return earlier with an error if mActor is not set. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D121771
2021-08-09 19:05:59 +00:00
Christoph Kerschbaumer 0ad84a48dd Bug 1723080: Update worker tests within dom/ to work with https-first enabled r=baku
Differential Revision: https://phabricator.services.mozilla.com/D121340
2021-08-09 14:26:37 +00:00
Luca Greco 7f7e073259 Bug 1638099 - Cover with an explicit xpcshell test the expected service worker lifecycle events on addon reload and browser restart. r=asuth,mixedpuppy
This patch introduce an additional xpcshell test task (built on top of the other one added in D119799)
which cover explicitly the following behaviors:
- the extension service worker registrations are expected to:
  - not be unregistered if the addon is shutting down as part of the application shutdown
  - to be unregistered if the addon is disabled (while the application is not shutting down)
- the extension service worker is expected to:
  - receive the "install" and "activate" lifecycle events when the service worker is registered for the first time
    or if the addon is disabled and then re-enabled while the application is not shutting down
  - not receive the "install" and "activate" lifecycle events when a previously active worker
    is spawned again (in particular after the entire application is restarted)

Ideally these behavior shoud be tested by restarting the browser instance as in a real Browser instance
but asserting all these behavior from a marionette test would be a bit trickier (but I still plan to
take a look into that, at least to cover with a marionette test a subset of the expected behaviors on
browser restart).

As an additional side note, the test case introduced in this test is currently assuming that we
may not proceed with D119531, and so to avoid to hit the issue described in that patch description
this patch is currently introducing an additional test-only method to nsIServiceWorkerManager
(named reloadRegistrationsForTest) which currently does the bare minimum to mock the "Browser restart"
scenario.

If on the contrary, we decide to proceed further with D119531, the new nsIServiceWorkerManager.reloadRegistrationsForTest
helper would not be needed anymore (because we would just use the existing ServiceWorkerRegistrationInfo instance which
is basically in the same state that the new one loaded from the ServiceWorkerRegistar would be, besides the issue with the
stale WebExtensionPolicy instance stored in the principal associated to the previous service worker registration).

Differential Revision: https://phabricator.services.mozilla.com/D120351
2021-07-26 17:52:26 +00:00
Luca Greco c346419b44 Bug 1638099 - Ensure spawning a new service worker for a disabled webextension does fail. r=asuth
This patch does prevent a service worker previously registered by a webextension to be spawned
if the webextension isn't enabled.

Instead of marking the service worker as disabled (e.g. as part of the registration data that we
store on disk), this patch is currently adding an additional check in
ServiceWorkerPrivateImpl::SpawnIfNeeded to make it early exit with an error if:
- the worker principal has a moz-extension url
- and it does not have a WebExtensionPolicy or the WebExtensionPolicy is not active
  (which would mean that the extension was being uninstalled or disabled)

Differential Revision: https://phabricator.services.mozilla.com/D119532
2021-07-26 17:52:25 +00:00
Kashav Madan 5781dca888 Bug 1720688 - Support extended attribute syntax in protocol declarations, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D119975
2021-07-22 02:24:43 +00:00
Eden Chuang 65018bcd9d Bug 1720410 - Unregister SW when reach navigation fault threshold. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D119878
2021-07-20 23:35:11 +00:00
Luca Greco bb54b70d04 Bug 1721214 - ServiceWorkerManager RegisterForTest and RegisterForAddonPrincipal should return a rejected promise on invalid call parameters. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D120254
2021-07-20 17:06:24 +00:00
Luca Greco 0995284f7d Bug 1638097 - ServiceWorkerManager should not store registration related to temporary addons. r=asuth
This patch include a small change to ServiceWorkerManager::StoreRegistration which does early exist
and not store the registration on disk if:
- the principal is from a WebExtension
- the addon is not enabled (or was already uninstalled) by the time we got to store the registration
- the addon is temporarily installed

At the moment it should not happen, but if ServiceWorkerManager::StoreRegistration was reached too late
for some reason and the registration was meant to be stored, the service worker would still be registered
again when the addon is started again on the next browser startup and stored on disk if it was meant to.

Depends on D119529

Differential Revision: https://phabricator.services.mozilla.com/D119530
2021-07-14 14:13:00 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Andrew Sutherland 6736ecda3b Bug 1503072 - Add mitigation to bypass SW on navigation fault. r=dom-worker-reviewers,necko-reviewers,valentin,edenchuang
We enable this mitigation by default because:
- The alternate UX is about:blank or corrupted content.  That's never good.
- We want to make sure that our test coverage handles this mitigation because
  it's want we want to ship.

However, we do explicitly disable it for all ServiceWorker WPT's via
`__dir__.ini` directive at the root of the service-workers test tree.

This is motivated by the
`/service-workers/service-worker/update-recovery.https.html` test which
intentionally tests a broken ServiceWorker being able to be updated.  It
explicitly tests that the intercepted broken iframe shouldn't successfully
load, but our mitigation makes it load, which breaks the test.

Depends on D111845

Differential Revision: https://phabricator.services.mozilla.com/D111993
2021-07-12 21:10:26 +00:00
Eden Chuang 4827006e24 Bug 1503072 - Navigation fault interception test support. r=dom-worker-reviewers,edenchuang
Depends on D111844

Differential Revision: https://phabricator.services.mozilla.com/D111845
2021-07-12 21:10:26 +00:00
Andrew Sutherland acb1039ba3 Bug 1503072 - re-enable browser_storage_recover.js r=dom-worker-reviewers,edenchuang
This test was disabled for parent-intercept by bug 1470266 when parent
intercept was still in-progress.  Since the landing of worker remoting
and related cleanups, I think we're generally good here and I was able
to locally get this to pass under "--verify".  Also, this test is
actively relevant to the fixes we're making here on bug 1503072.

Differential Revision: https://phabricator.services.mozilla.com/D111844
2021-07-12 21:10:25 +00:00
Iulian Moraru ef7b6b88df Backed out 3 changesets (bug 1503072) for causing bc failures on browser_navigation_fetch_fault_handling.js. CLOSED TREE
Backed out changeset f8c6503512f5 (bug 1503072)
Backed out changeset c04927c15fd8 (bug 1503072)
Backed out changeset b7550232d4f1 (bug 1503072)
2021-07-12 15:19:09 +03:00
Andrew Sutherland bd86df06b4 Bug 1503072 - Add mitigation to bypass SW on navigation fault. r=dom-worker-reviewers,necko-reviewers,valentin,edenchuang
We enable this mitigation by default because:
- The alternate UX is about:blank or corrupted content.  That's never good.
- We want to make sure that our test coverage handles this mitigation because
  it's want we want to ship.

However, we do explicitly disable it for all ServiceWorker WPT's via
`__dir__.ini` directive at the root of the service-workers test tree.

This is motivated by the
`/service-workers/service-worker/update-recovery.https.html` test which
intentionally tests a broken ServiceWorker being able to be updated.  It
explicitly tests that the intercepted broken iframe shouldn't successfully
load, but our mitigation makes it load, which breaks the test.

Depends on D111845

Differential Revision: https://phabricator.services.mozilla.com/D111993
2021-07-12 11:13:35 +00:00
Eden Chuang a774f50d6a Bug 1503072 - Navigation fault interception test support. r=dom-worker-reviewers,edenchuang
Depends on D111844

Differential Revision: https://phabricator.services.mozilla.com/D111845
2021-07-12 11:13:34 +00:00
Andrew Sutherland af502f19fc Bug 1503072 - re-enable browser_storage_recover.js r=dom-worker-reviewers,edenchuang
This test was disabled for parent-intercept by bug 1470266 when parent
intercept was still in-progress.  Since the landing of worker remoting
and related cleanups, I think we're generally good here and I was able
to locally get this to pass under "--verify".  Also, this test is
actively relevant to the fixes we're making here on bug 1503072.

Differential Revision: https://phabricator.services.mozilla.com/D111844
2021-07-12 11:13:34 +00:00
Yaron Tausky 768366d7b8 Bug 1496997 - Remove dom.serviceWorkers.parent_intercept pref r=asuth,dom-workers-and-storage-reviewers,perftest-reviewers,jgraham,sparky,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D101788
2021-06-15 08:52:39 +00:00
Eden Chuang a876ffd06b Bug 1564235 - P6 Enable partial web-platform tests for navigationPreloadManager. r=dom-worker-reviewers,asuth
Depends on D116918

Differential Revision: https://phabricator.services.mozilla.com/D117288
2021-06-10 06:01:28 +00:00
Eden Chuang 144f9f3b9c Bug 1564235 - P5 Save NavigationPreload data into serviceworker.txt. r=dom-worker-reviewers,asuth
This patch implements the part of saving/loading NavigationPreload data into/from serviceworker.txt

Depends on D116917

Differential Revision: https://phabricator.services.mozilla.com/D116918
2021-06-10 06:01:28 +00:00
Eden Chuang f5b7f71fb3 Bug 1564235 - P4 Save NavigationPreload data in ServiceWorkerRegistration Info. r=dom-worker-reviewers,asuth
This patch implements the parent process' part of NavigationPreload API.
After receiving the IPC, using the corresponding ServiceWorkerRegistrationProxy to send data to the main thread, then saving the NavigationPreload data on ServiceWorkerRegistrationInfo.

Depends on D116916

Differential Revision: https://phabricator.services.mozilla.com/D116917
2021-06-10 06:01:27 +00:00
Eden Chuang 800daa7911 Bug 1564235 - P3 Create IPC for NavigationPreload in PServiceWorkerRegistration.ipdl. r=dom-worker-reviewers,asuth
This patch implements the IPC for NavigationPreload APIs.
The IPC methods are created on PServiceWorkerRegistration.

Depends on D116914

Differential Revision: https://phabricator.services.mozilla.com/D116916
2021-06-10 06:01:27 +00:00
Eden Chuang 415ab42b7d Bug 1564235 - P2 Create NavigationPreloadManager.webidl and implement webidl binding. r=dom-worker-reviewers,webidl,asuth
This patch creates NavigationPreloadManager.webidl and implements the webidl binding.

Depends on D116913

Differential Revision: https://phabricator.services.mozilla.com/D116914
2021-06-10 06:01:26 +00:00
Csoregi Natalia e84ffc5f5c Backed out 6 changesets (bug 1564235) for ServiceWorkerRegistrar failures. CLOSED TREE
Backed out changeset 78d268b961e6 (bug 1564235)
Backed out changeset 198a29232047 (bug 1564235)
Backed out changeset b1503c48e2f6 (bug 1564235)
Backed out changeset 679bed36bc0b (bug 1564235)
Backed out changeset 789ce1a19e9f (bug 1564235)
Backed out changeset a4cd096b0ba7 (bug 1564235)
2021-06-10 05:17:08 +03:00
Eden Chuang 36ec693d5f Bug 1564235 - P5 Save NavigationPreload data into serviceworker.txt. r=dom-worker-reviewers,asuth
This patch implements the part of saving/loading NavigationPreload data into/from serviceworker.txt

Depends on D116917

Differential Revision: https://phabricator.services.mozilla.com/D116918
2021-06-10 00:48:12 +00:00
Eden Chuang b7870e4605 Bug 1564235 - P4 Save NavigationPreload data in ServiceWorkerRegistration Info. r=dom-worker-reviewers,asuth
This patch implements the parent process' part of NavigationPreload API.
After receiving the IPC, using the corresponding ServiceWorkerRegistrationProxy to send data to the main thread, then saving the NavigationPreload data on ServiceWorkerRegistrationInfo.

Depends on D116916

Differential Revision: https://phabricator.services.mozilla.com/D116917
2021-06-10 00:48:11 +00:00
Eden Chuang 04cdcb2866 Bug 1564235 - P3 Create IPC for NavigationPreload in PServiceWorkerRegistration.ipdl. r=dom-worker-reviewers,asuth
This patch implements the IPC for NavigationPreload APIs.
The IPC methods are created on PServiceWorkerRegistration.

Depends on D116914

Differential Revision: https://phabricator.services.mozilla.com/D116916
2021-06-10 00:48:11 +00:00
Eden Chuang 5dd1338210 Bug 1564235 - P2 Create NavigationPreloadManager.webidl and implement webidl binding. r=dom-worker-reviewers,webidl,asuth
This patch creates NavigationPreloadManager.webidl and implements the webidl binding.

Depends on D116913

Differential Revision: https://phabricator.services.mozilla.com/D116914
2021-06-10 00:48:11 +00:00
Yaron Tausky daf975567c Bug 1496997 - Remove ServiceWorkerParentInterceptEnabled() and callers r=asuth,dom-workers-and-storage-reviewers,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D101785
2021-06-08 21:02:55 +00:00
Yaron Tausky 645235e99a Bug 1496997 - Remove child intercept code from dom/workers r=asuth,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D101784
2021-06-08 21:02:55 +00:00
Yaron Tausky 8bccb10c7f Bug 1496997 - Remove rest of child intercept code from dom/serviceworkers r=asuth,dom-workers-and-storage-reviewers,sg,jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D101763
2021-06-08 21:02:54 +00:00
Yaron Tausky dde1fe54eb Bug 1496997 - Remove a chunk of child intercept code from dom/serviceworkers r=asuth,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D101632
2021-06-08 21:02:54 +00:00
Dana Keeler 1b9fd10c83 Bug 1701192 - don't allow third-party loads to set HSTS state r=annevk,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D115715
2021-06-02 16:52:19 +00:00
Yulia Startsev f288b2e904 Bug 1713615 - Rename WorkerType to WorkerKind; r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D116389
2021-06-01 16:59:50 +00:00
Eden Chuang 2b11373539 Bug 1681759 - Clear the previous controller if the redirect mode is REDIRECT_MODE_FOLLOW before setting for a no-fetch handler controller. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D115870
2021-05-31 09:36:53 +00:00
Peter Van der Beken f206ae96e4 Bug 1712725 - Stop clearing JS things when calling mozilla::DropJSObjects. r=mccr8
There's a pattern of clearing JS things when calling mozilla::DropJSObjects,
but mozilla::DropJSObjects already clears the JS things itself by calling
CycleCollectedJSRuntime::RemoveJSHolder.

Differential Revision: https://phabricator.services.mozilla.com/D115885
2021-05-27 08:35:40 +00:00
Nika Layzell 461b98ded0 Bug 1711090 - Part 3: Add some missing nsITimerCallback queryinterface targets, r=KrisWright,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D115108
2021-05-18 20:45:17 +00:00
Alexandru Michis 08e0f3cf36 Backed out 4 changesets (bug 1711090) for causing bustages in nsTimerImpl.cpp
CLOSED TREE

Backed out changeset 5c6f0950714d (bug 1711090)
Backed out changeset 0b6a886eea8a (bug 1711090)
Backed out changeset fc9c788ff41d (bug 1711090)
Backed out changeset ecc51d9ad027 (bug 1711090)
2021-05-18 20:25:56 +03:00
Nika Layzell 2eead824d8 Bug 1711090 - Part 3: Add some missing nsITimerCallback queryinterface targets, r=KrisWright,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D115108
2021-05-18 16:24:48 +00:00
Paul Bone 6191ca4916 Bug 1709526 - Fix all the lint errors for .ini files in dom/ r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D114321
2021-05-06 01:29:31 +00:00