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

5287 Коммитов

Автор SHA1 Сообщение Дата
Tim Huang e2cd77377d Bug 1743236 - Part 2: Use Partitioned Principal when creating clientSource in WorkerPrivate. r=dimi,edenchuang
We should use the parititoned principal when creating clientSource in
WorkerPrivate if the workerPrivate is in third-party context.

Differential Revision: https://phabricator.services.mozilla.com/D132370
2021-11-30 13:40:33 +00:00
Tooru Fujisawa 55e4cd7d71 Bug 1743223 - Add xpc::SetPrefableContextOptions to share JS::Contextoptions handling between main thread and workers. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D132331
2021-11-29 08:46:29 +00:00
Kagami Sascha Rosylight bde767c3c4 Bug 1743000 - Update test_worker_interfaces for Web Locks r=smaug
D132100 missed a file, sorry.

Differential Revision: https://phabricator.services.mozilla.com/D132163
2021-11-25 20:23:24 +00:00
criss 9e6f4a5f83 Backed out changeset e28b49b0f637 (bug 1743000) for causing failures on test_worker_interfaces_secureContext.html.CLOSED TREE DONTBUILD 2021-11-25 19:37:36 +02:00
Kagami Sascha Rosylight 4ece413ed7 Bug 1743000 - Update test_worker_interfaces for Web Locks r=smaug
D132100 missed a file, sorry.

Differential Revision: https://phabricator.services.mozilla.com/D132163
2021-11-25 17:04:26 +00:00
Tim Huang 713d89b9ec Bug 1731982 - Part 11: Set the `IsThirdPartyContextToTopWindow` flag to the main worker script loading channel. r=asuth
When loading the main worker script, we will need to get the clientInfo
for the loading channel. However, the loading channel is created in
content processes and the `IsThirdPartyContextToTopWindow` won't be set
in this case. So, we will get an incorrect clientInfo with a wrong
foreign patitioned principal.

To resolve this, we have to set the flag in the content processes so
that we can get a correct clientInfo. The flag comes from the
workerPrivate which reflects the fact if the worker was created in a
third-party context. And the loading channel should have the same flag
as the document which creates the worker.

Differential Revision: https://phabricator.services.mozilla.com/D129060
2021-11-25 13:11:33 +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
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
Kagami Sascha Rosylight 612a0ec559 Bug 1742469 - Part 8: Resolve clang-analyzer-core.CallAndMessage warning r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131936
2021-11-25 01:16:37 +00:00
Kagami Sascha Rosylight 4998d9ed28 Bug 1742469 - Part 7: Resolve bugprone-argument-comment warnings r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131935
2021-11-25 01:16:36 +00:00
Kagami Sascha Rosylight 37ff03a3eb Bug 1742469 - Part 6: Resolve cppcoreguidelines-narrowing-conversions warnings r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131934
2021-11-25 01:16:36 +00:00
Kagami Sascha Rosylight 0dc4844066 Bug 1742469 - Part 5: Resolve modernize-use-equals-delete warnings r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131933
2021-11-25 01:16:35 +00:00
Kagami Sascha Rosylight 4be9cddc05 Bug 1742469 - Part 4: Resolve modernize-loop-convert warnings r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131932
2021-11-25 01:16:35 +00:00
Kagami Sascha Rosylight 87196d74de Bug 1742469 - Part 3: Resolve cppcoreguidelines-pro-type-member-init warnings r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131931
2021-11-25 01:16:35 +00:00
Kagami Sascha Rosylight 5ad3992d1f Bug 1742469 - Part 2: Resolve readability-qualified-auto warnings r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131930
2021-11-25 01:16:34 +00:00
Kagami Sascha Rosylight 692ab475b4 Bug 1742469 - Part 1: Resolve simplify-boolean-expr warnings r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131929
2021-11-25 01:16:34 +00:00
Lars T Hansen e7af33f689 Bug 1742790 - Make WasmFeatures more flexible. r=rhunt
Introduce a TENTATIVE state for a feature that allows the shell flags
to be used more flexibly: the feature is enabled bug --wasm-whatever
can be used as a no-op.  This helps reduce breakage while we're in the
process of enabling a feature by default.

Finesse the EXPERIMENTAL state so that --no-wasm-whatever is accepted
as a no-op.

Differential Revision: https://phabricator.services.mozilla.com/D132017
2021-11-24 19:31:55 +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
Andrew Osmond 32fecf4098 Bug 1657375 - Cache the principal hash value for OffscreenCanvas on worker threads. r=dom-worker-reviewers,asuth,smaug
We cannot access ClientWebGLContext::mCanvasElement or its associated
nsIPrincipal off the main thread. We use the hash value of the principal
to limit how many WebGL contexts a single domain can create. We can
compute this when the worker is initialized for OffscreenCanvas worker
instances.

Differential Revision: https://phabricator.services.mozilla.com/D128530
2021-11-09 20:16:05 +00:00
Andrew Osmond 3c9cebcd6e Bug 1735874 - Fix broken resist fingerprinting with OffscreenCanvas on worker threads. r=dom-worker-reviewers,asuth,smaug
OffscreenCanvas can be run on worker threads and is disabled by default.
The existing code trips asserts because we try to use the document,
which is main thread only, directly on the worker thread. This patch
caches the resist fingerprinting status for the worker when it is
created for future reference.

Differential Revision: https://phabricator.services.mozilla.com/D128510
2021-11-09 20:16:04 +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
Gerald Squelart 5399574d8b Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-08 23:59:35 +00:00
Randell Jesup b257161e3a Bug 1738765: Process-isolate ServiceWorkers if they match an allow-list of sites r=nika,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D130113
2021-11-08 19:53:06 +00:00
Tim Huang 774da459e3 Bug 1731982 - Part 11: Set the `IsThirdPartyContextToTopWindow` flag to the main worker script loading channel. r=asuth
When loading the main worker script, we will need to get the clientInfo
for the loading channel. However, the loading channel is created in
content processes and the `IsThirdPartyContextToTopWindow` won't be set
in this case. So, we will get an incorrect clientInfo with a wrong
foreign patitioned principal.

To resolve this, we have to set the flag in the content processes so
that we can get a correct clientInfo. The flag comes from the
workerPrivate which reflects the fact if the worker was created in a
third-party context. And the loading channel should have the same flag
as the document which creates the worker.

Differential Revision: https://phabricator.services.mozilla.com/D129060
2021-11-08 14:30:57 +00: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
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
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
Kagami Sascha Rosylight a87966176f Bug 1738905 - Part 1: Add WorkerPrivate::GetWindowNested() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D130190
2021-11-06 00:06:03 +00:00
Luca Greco ef287a67cc Bug 1728326 - Notify WebExtensions internals when a background service worker scripts has been executed. r=asuth
This patch includes changes needed to notify the WebExtensions internals
when a background service worker script has been fully loaded, through a
NotifyWorkerLoadedRunnable (dispatched as low priority) that calls a new
mozIExtensionAPIRequestHandler.onExtensionWorkerLoaded method.

Differential Revision: https://phabricator.services.mozilla.com/D124701
2021-11-05 21:27:03 +00:00
Luca Greco ca30978498 Bug 1728326 - Notify WebExtensions internals when the background service worker is ready to be executed. r=asuth
This patch adds additional changes needed to notify, from WorkerPrivate ExecutionReady,
the WebExtensions internals that a new background service worker is ready to be executed,
and its related ExtensionWorkerContextChild should be created and initialized.

Differential Revision: https://phabricator.services.mozilla.com/D124700
2021-11-05 21:27:03 +00:00
Luca Greco b06c98ebfe Bug 1728326 - Notify WebExtensions internals when a WebExtensions background service worker is destroyed. r=asuth
This patch introduces the following changes:
- In WorkerPrivate::ExtensionAPIAllowed: removed assertion on StaticPrefs::extensions_backgroundServiceWorker_enabled_AtStartup,
  replaced with just ignoring mExtensionAPIAllowed if the feature is turned out by prefs
- Added a new CreateAndDispatchWorkerDestroyedRunnable helper function to create and dispatch
  a runnable (as a low priority one) to call a new mozIExtensionAPIRequestHandler.onExtensionWorkerDestroyed
  method.

The service worker that has been destroyed is identified by its descriptor ID (the descriptor ID is an integer,
assigned on the main process to each ServiceWorkerPrivate instance, and still available when the worker is
already being destroyed).

Differential Revision: https://phabricator.services.mozilla.com/D124697
2021-11-05 21:27:02 +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 60bb3c8c86 Bug 1728326 - Notify WebExtensions internals when a background service worker scripts has been executed. r=asuth
This patch includes changes needed to notify the WebExtensions internals
when a background service worker script has been fully loaded, through a
NotifyWorkerLoadedRunnable (dispatched as low priority) that calls a new
mozIExtensionAPIRequestHandler.onExtensionWorkerLoaded method.

Differential Revision: https://phabricator.services.mozilla.com/D124701
2021-11-05 20:27:01 +00:00
Luca Greco a053a7d451 Bug 1728326 - Notify WebExtensions internals when the background service worker is ready to be executed. r=asuth
This patch adds additional changes needed to notify, from WorkerPrivate ExecutionReady,
the WebExtensions internals that a new background service worker is ready to be executed,
and its related ExtensionWorkerContextChild should be created and initialized.

Differential Revision: https://phabricator.services.mozilla.com/D124700
2021-11-05 20:27:00 +00:00
Luca Greco fe6d66f09d Bug 1728326 - Notify WebExtensions internals when a WebExtensions background service worker is destroyed. r=asuth
This patch introduces the following changes:
- In WorkerPrivate::ExtensionAPIAllowed: removed assertion on StaticPrefs::extensions_backgroundServiceWorker_enabled_AtStartup,
  replaced with just ignoring mExtensionAPIAllowed if the feature is turned out by prefs
- Added a new CreateAndDispatchWorkerDestroyedRunnable helper function to create and dispatch
  a runnable (as a low priority one) to call a new mozIExtensionAPIRequestHandler.onExtensionWorkerDestroyed
  method.

The service worker that has been destroyed is identified by its descriptor ID (the descriptor ID is an integer,
assigned on the main process to each ServiceWorkerPrivate instance, and still available when the worker is
already being destroyed).

Differential Revision: https://phabricator.services.mozilla.com/D124697
2021-11-05 20:26:59 +00:00
Cristian Tuns 1aeac93d23 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
Gerald Squelart 7fa084ae7c Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-05 05:52:28 +00:00
Riya c45c0f507e Bug 1730126 - Enable ESLint rule no-loss-of-precision. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D129336
2021-10-29 08:29:26 +00: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
Niklas Goegge 1244799959 Bug 1732052: Remove pref privacy.file_unique_origin r=ckerschb,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D126898
2021-10-19 12:57:34 +00:00
Gerald Squelart df50ece611 Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D128577
2021-10-18 23:11:30 +00:00
msub2 d7037d2ab2 Bug 1726734 - Replace deprecated octal sequences to satisfy ESLint no-octal-rule. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D128684
2021-10-18 14:37:04 +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
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
Steve Fink 436b3f12a2 Bug 1732161 - Track CCReason for all cycle collections (replacing ccType) r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126395
2021-10-14 18:15:40 +00:00