Commit Graph

1764 Commits

Author SHA1 Message Date
Eden Chuang
6dbb975108 Bug 1968427 - Adding a null checking on WorkerPrivate::GlobalScope() in ServiceWorkerOpRunnable. a=diannaS
WorkerPrivate's GlobalScope is created during CompileScriptRunnable::WorkerRun.
However, the creation could fail when there is an OOM issue during the WebIDL bindings.
Although the Worker will start the shutdown as soon as possible, there is still a chance that some WorkerRunnable had already been dispatched to the Worker. And there is no guarantee that there is a GlobalScope for the WorkerRunnable.
Unfortunately, WorkerRunnable should check the GlobalScope existence by itself, because not every WorkerRunnable needs the GlobalScope to perform its functionality.

This patch only does the null checking for the ServiceWorkerOpRunnable, since ServiceWorkerOpRunnable are supposed to dispatching an event to the corresponding ServiceWorkerGlobalScope.

Original Revision: https://phabricator.services.mozilla.com/D254659

Differential Revision: https://phabricator.services.mozilla.com/D258725
2025-07-25 19:04:42 +00:00
Andrew Sutherland
b4e9cd5522 Bug 1967877 - Ignore prefs set by PBM new tab page that trip up test-verify mode. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D250566
2025-05-22 03:11:03 +00:00
Tom Schuster
3f48655456 Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D250182
2025-05-21 15:21:52 +00:00
Serban Stanca
071240c3d9 Revert "Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw" for causing multiple failures.
This reverts commit b9a9491a35.
2025-05-21 13:34:54 +00:00
Tom Schuster
b9a9491a35 Bug 1967417 - Create a fallible LoadInfo factory. r=smaug,necko-reviewers,places-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D250182
2025-05-21 12:24:10 +00:00
serge-sans-paille
bf3516e81e Bug 1964489 - Avoid duplication in NS_DECLARE_STATIC_IID_ACCESSOR / NS_DEFINE_STATIC_IID_ACCESSOR r=nika,necko-reviewers,media-playback-reviewers,places-reviewers,win-reviewers,dom-storage-reviewers,xpcom-reviewers,gstoll,janv,emilio,padenot,valentin,asuth
In modern C++, static constexpr member variables are automatically
inline (aka weak) so the template trick is not needed. This also avoid
duplication and reduces the amount of parsed code. No impact on
generated binary (actually: smaller debuginfo, close to identical
binary).

Differential Revision: https://phabricator.services.mozilla.com/D247825
2025-05-08 08:05:51 +00:00
Andrea Marchesini
a08b7e1d91 Bug 1963775 - Expose path/domain/expiry/sameSite properties in CookieStore API, r=edgul,webidl,emilio,valentin,anti-tracking-reviewers,bvandersloot
Differential Revision: https://phabricator.services.mozilla.com/D247421
2025-05-06 13:54:42 +00:00
Cosmin Sabou
24f763ef43 Revert "Bug 1963775 - Expose path/domain/expiry/sameSite properties in CookieStore API, r=webidl,emilio,valentin" for non-unified build bustages.
This reverts commit 96025741c8.
2025-05-05 23:27:57 +00:00
Andrea Marchesini
96025741c8 Bug 1963775 - Expose path/domain/expiry/sameSite properties in CookieStore API, r=webidl,emilio,valentin
Differential Revision: https://phabricator.services.mozilla.com/D247421
2025-05-05 21:53:57 +00:00
Eden Chuang
c587dc023d Bug 1964033 - Update the ServiceWorkerShutdown progress setup assertion. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D247580
2025-05-05 11:53:09 +00:00
Eden Chuang
0dd34d4e02 Bug 1963402 - Using DirectTaskDispatch for MozPromises related to FetchService. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D247131
2025-05-02 10:08:13 +00:00
Eden Chuang
690f31270c Bug 1675826 - Making ServiceWorkerPrivate::mIdlePromiseHolder in DirectTaskDispatching mode. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D247127
2025-05-02 10:07:33 +00:00
Andrea Marchesini
07795cc040 Bug 1958875 - Re-enable CookieStore API, r=edgul,webidl,smaug,valentin
Differential Revision: https://phabricator.services.mozilla.com/D245905
2025-05-01 15:22:00 +00:00
Tom Schuster
edaa914b45 Bug 1947732 - Provide nsIPrincipal to GetTrustedTypesCompliantString. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D246424
2025-04-30 11:09:07 +00:00
Cristian Tuns
7d24b67671 Backed out changeset 7aeb1bd11e48 (bug 1958875) for causing mochitest failures in test_interfaces_secureContext.html CLOSED TREE 2025-04-30 07:08:57 -04:00
Andrea Marchesini
9b118b185c Bug 1958875 - Re-enable CookieStore API, r=edgul,webidl,smaug,valentin
Differential Revision: https://phabricator.services.mozilla.com/D245905
2025-04-30 09:48:43 +00:00
Erich Gubler
7ee63ec8b6 Bug 1961491 - test(webgpu): whoops, get the forgotten WGSLLanguageFeatures, too
Differential Revision: https://phabricator.services.mozilla.com/D246379
2025-04-23 03:10:48 +00:00
Erich Gubler
879795b9b1 Bug 1961491 - test(webgpu): s/isEarlyBetaOrEarlier/earlyBetaOrEarlier/ in DOM interfaces tests for service workers, too (oops!) r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D246238
2025-04-22 15:16:49 +00:00
Erich Gubler
5df5cafc15 Bug 1956072 - chore(webgpu): start shipping in early Beta r=webgpu-reviewers,webidl,smaug,jimb
Differential Revision: https://phabricator.services.mozilla.com/D244595
2025-04-16 17:04:51 +00:00
André Bargull
19db4a67ea Bug 1960889: Expose Temporal as a new global property. r=dminor,webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D245728
2025-04-16 13:50:18 +00:00
Iulian Moraru
ae9c76cacf Backed out changeset cc460b0d6734 (bug 1956072) for causing instrumented build bustages. CLOSED TREE 2025-04-14 21:28:26 +03:00
Erich Gubler
7c738ee400 Bug 1956072 - chore(webgpu): start shipping in early Beta r=webgpu-reviewers,webidl,smaug,jimb
Differential Revision: https://phabricator.services.mozilla.com/D244595
2025-04-14 16:22:21 +00:00
Rob Wu
62248a8bcc Bug 1953004 - Run test-manifest-toml --fix on all toml files in the trees r=credential-management-reviewers,places-reviewers,desktop-theme-reviewers,Standard8,devtools-reviewers,hjones,jmaher,jdescottes,dimi,necko-reviewers,sidebar-reviewers,jsudiaman,kershaw
This diff was generated as follows:

List all toml files in the tree:

`find * -name '*.toml' > /tmp/toml`

Manually edited /tmp/toml to drop non-relevant entries (objdir).

Ran the toml linter for all files:

`cat /tmp/toml | xargs ./mach lint -l test-manifest-toml --fix`

Differential Revision: https://phabricator.services.mozilla.com/D240948
2025-04-14 08:30:13 +00:00
Erich Gubler
2dfd341ad0 Bug 1958069 - feat(webgpu): add GPUPipelineError in IDL r=webgpu-reviewers,webidl,smaug,nical
Differential Revision: https://phabricator.services.mozilla.com/D244237
2025-04-10 19:27:50 +00:00
Florian Quèze
f861f3fa68 Bug 1956726 - remove leftover Telemetry.h includes in header files, r=chutten,places-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D244350
2025-04-08 13:03:01 +00:00
Sean Feng
50283b3d41 Bug 1958943 - Re-enable dom.enable_web_task_scheduling r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D244647
2025-04-07 19:50:23 +00:00
Fatih Kilic
aba2cdec5d Bug 1954188: bFPP Part 2 - Implement granular overrides. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D241852
2025-04-03 17:30:18 +00:00
Cristina Horotan
b163893208 Backed out 7 changesets (bug 1954188) for causing bc failures at browser_preferences_usage.js
Backed out changeset dae6e2ec0b2d (bug 1954188)
Backed out changeset 47f683e9f0d6 (bug 1954188)
Backed out changeset 14ed1c70e1ec (bug 1954188)
Backed out changeset 291590143ed9 (bug 1954188)
Backed out changeset fbb4e968f0f1 (bug 1954188)
Backed out changeset 4c21e081561e (bug 1954188)
Backed out changeset 33e6088d8317 (bug 1954188)
2025-04-03 03:21:46 +03:00
Fatih Kilic
5e976e648e Bug 1954188: bFPP Part 2 - Implement granular overrides. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D241852
2025-04-02 17:26:35 +00:00
kernp25
4d18975ff5 Bug 1945924 - Replace SchemeIsFoo functions with the inlined SchemeIs() call. r=valentin,emilio,necko-reviewers,geckoview-reviewers,anti-tracking-reviewers,core-sessionstore-reviewers,ohall,farre
No behavior change intended.

Differential Revision: https://phabricator.services.mozilla.com/D236756
2025-03-31 14:25:54 +00:00
Andrew Sutherland
9371c451bd Bug 1781395 - Prevent deletion of ServiceWorkerRegistration objects while async IPC calls are in flight. r=dom-worker-reviewers,jstutte
Ensure that all async IPC calls made on ServiceWorkerRegistration (which
includes calls made on behalf of NavigationPreloadManager) hold a strong
reference to the ServiceWorkerRegistration for the duration of the async
IPC calls so that the ServiceWorkerRegistration is not cycle-collected
if the caller is only then-ing on the promise and has not retained a strong
reference to the ServiceWorkerRegistration.

This is accomplished by holding a strong self-reference in the IPC-resolved
callback.

In order to ensure that these strong references are properly cleaned up on
the main thread, we:
- Add a call to Shutdown during DisconnectFromOwner to shutdown IPC when the
  global is being torn down.
- Modernize PServiceWorkerRegistration to allow the child to directly invoke
  `Send__delete__` rather than having to ask the parent to call that method
  via `SendTeardown`.  This ensures the actor is destroyed in a more timely
  fashion and generally makes things easier to reason about.
- Eliminate use of boolean flags that are redundant with what `CanSend()`
  indicates (as long as we call it on the thread that owns the actor).

The Shutdown call isn't technically needed on the worker thread because worker
shutdown tears down PBackground and thereby all PServiceWorkerRegistration
instances, although these cleanups make that cleanup happen in a more timely
fashion.  Additionally, ServiceWorkerRegistrationChild does use IPCWorkerRef
with the callback triggering eager shutdown of the actor on workers
(notify(Canceling) can occur prior to DisconnectFromOwner when the interrupt
is used), but the more notable impact is IPCWorkerRef causes the actor to
not be counted as something that should prevent GC of the worker (and these
changes do not alter that).

Differential Revision: https://phabricator.services.mozilla.com/D242885
2025-03-26 01:31:06 +00:00
Andrew Sutherland
d655001018 Bug 1320796 - Support ServiceWorkers in Private Browsing Mode. r=dom-worker-reviewers,anti-tracking-reviewers,edenchuang,bvandersloot
To most directly run the tests, run:
```
./mach mochitest --headless -f plain --tag dom-serviceworkers-api-private dom/serviceworkers/test/
```

Differential Revision: https://phabricator.services.mozilla.com/D213733
2025-03-26 01:31:05 +00:00
Andrea Marchesini
ba7171a07e Bug 1947894 - CookieStore SW support - part 4 - CookieStoreManager, r=smaug,asuth,edgul
Differential Revision: https://phabricator.services.mozilla.com/D238512
2025-03-25 21:51:50 +00:00
Andrea Marchesini
dc4a1be4d8 Bug 1947894 - CookieStore SW support - part 2 - ServiceWorker expandos, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D238484
2025-03-25 21:51:49 +00:00
Andrea Marchesini
d00af83855 Bug 1947894 - CookieStore SW support - part 1 - ServiceWorkerRegistrar version handling, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D238483
2025-03-25 21:51:49 +00:00
Erich Gubler
d632ae7411 Bug 1952345 - feat(webgpu): stub out GPUExternalTexture r=webgpu-reviewers,webidl,smaug,teoxoy
Do this by populating a trivial `ExtTex` type in `ExternalTexture.h`. Do not use `ExternalTexture`, since that's currently used by the internals that actually implement interesting operations for external texture usage with WGPU; punt on figuring out the perfect name for later.

This allows many CTS tests, which use `x instanceof GPUExternalTexture` without actually consuming the external texture API, to make interesting forward progress.

This should be strictly safe to do, since we do not permit the user to actually construct or use a `GPUExternalTexture`.

Analysis of CTS outcome changes:

- New `PASS`es resulting in promotion to tier 2:
	- `webgpu:shader,execution,expression,call,builtin,textureDimensions:depth:*`
	- `webgpu:shader,execution,expression,call,builtin,textureDimensions:sampled_and_multisampled:*` on Linux and macOS
	- `webgpu:shader,execution,expression,call,builtin,textureLoad:sampled_1d:*` on Windows and Linux
	- `webgpu:shader,execution,expression,call,builtin,textureLoad:sampled_3d:*` on Windows and Linux
	- `webgpu:shader,execution,expression,call,builtin,textureNumLayers:arrayed:*` on Linux and macOS
	- `webgpu:shader,execution,expression,call,builtin,textureNumLayers:sampled:*` on Linux and macOS
	- `webgpu:shader,execution,expression,call,builtin,textureNumLevels:depth:*`
	- `webgpu:shader,execution,expression,call,builtin,textureNumLevels:sampled:*` on Linux and macOS
	- `webgpu:shader,execution,expression,call,builtin,textureNumSamples:depth:*`
	- `webgpu:shader,execution,expression,call,builtin,textureNumSamples:sampled:*`
	- `webgpu:shader,execution,expression,call,builtin,textureSample:sampled_1d_coords:*` on Windows and Linux

	Otherwise are _many_ new `PASS`es in test variants that don't quite make entire test(s) pass, so this is definitely a good change. 🙂
- Some tests' variants have been deleted, since they are no longer reported due to _all_ runs of them `CRASH`ing due to timeout (rather than a stack crash). This will be dealt with in follow-up work. Since these tests are in tier 3, I don't see a hard problem with letting these be deleted for now.

Differential Revision: https://phabricator.services.mozilla.com/D240673
2025-03-18 01:10:58 +00:00
Norisz Fay
3c3f2317ac Backed out 2 changesets (bug 1952345) for causing bustage on RefPtr.h CLOSED TREE
Backed out changeset 95a2c6644d9f (bug 1952345)
Backed out changeset 624402c0e2a3 (bug 1952345)
2025-03-17 20:20:55 +02:00
Erich Gubler
c25ab63b49 Bug 1952345 - feat(webgpu): stub out GPUExternalTexture r=webgpu-reviewers,webidl,smaug,teoxoy
Do this by populating a trivial `ExtTex` type in `ExternalTexture.h`. Do not use `ExternalTexture`, since that's currently used by the internals that actually implement interesting operations for external texture usage with WGPU; punt on figuring out the perfect name for later.

This allows many CTS tests, which use `x instanceof GPUExternalTexture` without actually consuming the external texture API, to make interesting forward progress.

This should be strictly safe to do, since we do not permit the user to actually construct or use a `GPUExternalTexture`.

Analysis of CTS outcome changes:

- New `PASS`es resulting in promotion to tier 2:
	- `webgpu:shader,execution,expression,call,builtin,textureDimensions:depth:*`
	- `webgpu:shader,execution,expression,call,builtin,textureDimensions:sampled_and_multisampled:*` on Linux and macOS
	- `webgpu:shader,execution,expression,call,builtin,textureLoad:sampled_1d:*` on Windows and Linux
	- `webgpu:shader,execution,expression,call,builtin,textureLoad:sampled_3d:*` on Windows and Linux
	- `webgpu:shader,execution,expression,call,builtin,textureNumLayers:arrayed:*` on Linux and macOS
	- `webgpu:shader,execution,expression,call,builtin,textureNumLayers:sampled:*` on Linux and macOS
	- `webgpu:shader,execution,expression,call,builtin,textureNumLevels:depth:*`
	- `webgpu:shader,execution,expression,call,builtin,textureNumLevels:sampled:*` on Linux and macOS
	- `webgpu:shader,execution,expression,call,builtin,textureNumSamples:depth:*`
	- `webgpu:shader,execution,expression,call,builtin,textureNumSamples:sampled:*`
	- `webgpu:shader,execution,expression,call,builtin,textureSample:sampled_1d_coords:*` on Windows and Linux

	Otherwise are _many_ new `PASS`es in test variants that don't quite make entire test(s) pass, so this is definitely a good change. 🙂
- Some tests' variants have been deleted, since they are no longer reported due to _all_ runs of them `CRASH`ing due to timeout (rather than a stack crash). This will be dealt with in follow-up work. Since these tests are in tier 3, I don't see a hard problem with letting these be deleted for now.

Differential Revision: https://phabricator.services.mozilla.com/D240673
2025-03-17 15:41:45 +00:00
Kagami Sascha Rosylight
e0242c68ed Bug 1952462 - Part 1: Add NotificationEvent.action r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D241083
2025-03-14 06:25:03 +00:00
Sebastian Hengst
591b53c8f7 Bug 1953368 - set CookieStore interfaces as Nightly-only. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D241212
2025-03-12 14:40:12 +00:00
Kagami Sascha Rosylight
07d44dfdf7 Bug 1951956 - Clean up MozPromiseHolder when shutting down r=asuth
The callback may never be called if the parent process shuts down before getting the async result.

Another reason why bug 1937194 is wanted.

Differential Revision: https://phabricator.services.mozilla.com/D240497
2025-03-06 09:00:24 +00:00
Kagami Sascha Rosylight
7283c087f8 Bug 1951379 - Part 3: Add NotificationStorageEntry r=asuth
This skips handling `vibrate` for now, as we don't ship it and it also complicates test setup.

Differential Revision: https://phabricator.services.mozilla.com/D240213
2025-03-04 18:00:18 +00:00
Kagami Sascha Rosylight
d46294d009 Bug 1951379 - Part 2: Use IPCNotification in ServiceWorkerManager r=asuth
This makes sendNotification*Event as [noscript] because there's no JS binding for IPCNotification. Fortunately there's no JS callers and I'm not planning to make one.

Differential Revision: https://phabricator.services.mozilla.com/D240187
2025-03-04 18:00:17 +00:00
Kagami Sascha Rosylight
517e37a9da Bug 1950117 - Add PServiceWorkerRegistration::GetNotifications r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D239793
2025-03-03 16:48:49 +00:00
Cristina Horotan
d9e06baff6 Backed out 6 changesets (bug 1837969, bug 1320796) for causing mochitets failures at test_file_blob_upload.html. CLOSED TREE
Backed out changeset 1e583de2110f (bug 1320796)
Backed out changeset f9fd810e029c (bug 1320796)
Backed out changeset a54afb750109 (bug 1320796)
Backed out changeset 965e5db0af1b (bug 1320796)
Backed out changeset f93ed49dbc28 (bug 1320796)
Backed out changeset 2e7b9f87e4a3 (bug 1837969)
2025-03-02 21:20:16 +02:00
Otto Länd
7c36e3f9f4 Bug 1950885: apply code formatting via Lando
# ignore-this-changeset
2025-02-28 13:44:06 +00:00
Kagami Sascha Rosylight
28b502bd63 Bug 1950885 - Part 2: Make ServiceWorkerPrivate::SendNotificationEvent use IPCNotificationOptions r=asuth
I wanted to make ServiceWorkerManager use it too, but XPIDL doesn't support structs...

Differential Revision: https://phabricator.services.mozilla.com/D239941
2025-02-28 13:41:25 +00:00
Kagami Sascha Rosylight
6072514386 Bug 1950885 - Part 1: Make disable_open_click_delay pref static r=asuth,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D239940
2025-02-28 13:41:25 +00:00
Nazım Can Altınova
ff6637364b Bug 1799109 - Replace AUTO_PROFILER_MARKER_TEXT markers without a text with the new untyped one r=profiler-reviewers,florian
Differential Revision: https://phabricator.services.mozilla.com/D238121
2025-02-27 21:45:18 +00:00
Otto Länd
9eb868b2f5 Bug 1320796, 1837969: apply code formatting via Lando
# ignore-this-changeset
2025-02-27 05:12:30 +00:00