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

5186 Коммитов

Автор SHA1 Сообщение Дата
Luca Greco ca22ab0254 Bug 1682632 - part1: add ExtensionBrowser webidl API skeleton to Extension Background Service Worker. r=baku,mixedpuppy,asuth
- Extension API WebIDL to be part of a new dom/extensions-webidl directory
  (and all webidl in this directory associated with WebExtensions::General
  bugzilla component)

- Extension API C++ implementation in a new toolkit/components/extensions/webidl-api
  directory

- Lock Extensions API WebIDL bindings provided to extensions workers global on:
  - the preference "extensions.backgroundServiceWorker.enabled" being set to true
  - checking explicitly that the worker is an extension service worker declared
    in the extension manifest.json file.

- Changes to WorkerPrivate, WorkerScope.h/.cpp to expose the WebIDL
  bindings to the extension service workers (if the service worker has been
  detected as the background service worker specified in the manifest),
  plus small changes to RemoteWorkerChild.cpp to detect if the worker
  is the background service worker (and mark it as so in the WorkerPrivate
  instance associated to it)

Differential Revision: https://phabricator.services.mozilla.com/D70372
2021-06-11 18:58:06 +00:00
Alexandru Michis be06efd457 Backed out 14 changesets (bug 1682632) for causing hazard bustages in ExtensionEventManager.cpp
Backed out changeset c5acc19db606 (bug 1682632)
Backed out changeset 61380029a38b (bug 1682632)
Backed out changeset d3a153070b38 (bug 1682632)
Backed out changeset 8b8bd2385503 (bug 1682632)
Backed out changeset 7fa45afd83a0 (bug 1682632)
Backed out changeset 57652a2152ac (bug 1682632)
Backed out changeset 9195b13525d0 (bug 1682632)
Backed out changeset a647c0cb85e4 (bug 1682632)
Backed out changeset 55553e0dc6ca (bug 1682632)
Backed out changeset c85363089c29 (bug 1682632)
Backed out changeset 6c1f4efb4975 (bug 1682632)
Backed out changeset 9452456d249f (bug 1682632)
Backed out changeset 7b8016e5f3fb (bug 1682632)
Backed out changeset ba742f7e256f (bug 1682632)
2021-06-10 17:28:23 +03:00
Luca Greco acbf6ce964 Bug 1682632 - part1: add ExtensionBrowser webidl API skeleton to Extension Background Service Worker. r=baku,mixedpuppy,asuth
- Extension API WebIDL to be part of a new dom/extensions-webidl directory
  (and all webidl in this directory associated with WebExtensions::General
  bugzilla component)

- Extension API C++ implementation in a new toolkit/components/extensions/webidl-api
  directory

- Lock Extensions API WebIDL bindings provided to extensions workers global on:
  - the preference "extensions.backgroundServiceWorker.enabled" being set to true
  - checking explicitly that the worker is an extension service worker declared
    in the extension manifest.json file.

- Changes to WorkerPrivate, WorkerScope.h/.cpp to expose the WebIDL
  bindings to the extension service workers (if the service worker has been
  detected as the background service worker specified in the manifest),
  plus small changes to RemoteWorkerChild.cpp to detect if the worker
  is the background service worker (and mark it as so in the WorkerPrivate
  instance associated to it)

Differential Revision: https://phabricator.services.mozilla.com/D70372
2021-06-10 09:34:51 +00:00
Csoregi Natalia d2e0d6f213 Backed out 14 changesets (bug 1682632) for mbu failures. CLOSED TREE
Backed out changeset e14034a66620 (bug 1682632)
Backed out changeset 3e47d00b7822 (bug 1682632)
Backed out changeset bf010d24288c (bug 1682632)
Backed out changeset 9e321d3b964b (bug 1682632)
Backed out changeset 36540900695b (bug 1682632)
Backed out changeset 8660a7bcc4e1 (bug 1682632)
Backed out changeset 89322328bf07 (bug 1682632)
Backed out changeset 1bc53013f8b3 (bug 1682632)
Backed out changeset afcbc61ae254 (bug 1682632)
Backed out changeset 6a9f2fdec9ff (bug 1682632)
Backed out changeset 017891ebb9dd (bug 1682632)
Backed out changeset f78f3e3c8fa4 (bug 1682632)
Backed out changeset 16d334e1548f (bug 1682632)
Backed out changeset 006dfdbfe446 (bug 1682632)
2021-06-09 23:16:13 +03:00
Luca Greco d3a3291a41 Bug 1682632 - part1: add ExtensionBrowser webidl API skeleton to Extension Background Service Worker. r=baku,mixedpuppy,asuth
- Extension API WebIDL to be part of a new dom/extensions-webidl directory
  (and all webidl in this directory associated with WebExtensions::General
  bugzilla component)

- Extension API C++ implementation in a new toolkit/components/extensions/webidl-api
  directory

- Lock Extensions API WebIDL bindings provided to extensions workers global on:
  - the preference "extensions.backgroundServiceWorker.enabled" being set to true
  - checking explicitly that the worker is an extension service worker declared
    in the extension manifest.json file.

- Changes to WorkerPrivate, WorkerScope.h/.cpp to expose the WebIDL
  bindings to the extension service workers (if the service worker has been
  detected as the background service worker specified in the manifest),
  plus small changes to RemoteWorkerChild.cpp to detect if the worker
  is the background service worker (and mark it as so in the WorkerPrivate
  instance associated to it)

Differential Revision: https://phabricator.services.mozilla.com/D70372
2021-06-09 19:20:40 +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
Matthew Gaudet 0c96a16bf6 Bug 1712174 - Add browser preference for class static blocks r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D116875
2021-06-07 14:57:42 +00:00
Matthew Gaudet e36c58d8fa Bug 1714105 - Enable ergonomic brand checks in workers r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D116745
2021-06-07 14:56:56 +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
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
Andre Natal ae881de410 Bug 1674383 - Allow the usage of SharedArrayBuffer by priviliged addons r=mixedpuppy,asuth,nika
Allow the usage of SharedArrayBuffer by priviliged addons

Differential Revision: https://phabricator.services.mozilla.com/D114046
2021-05-17 16:17:38 +00:00
Nicolas B. Pierron 965cab1dbc Bug 1458339 part 2 - Use shared memory to initialize the JS engine. r=smaug,tcampbell,necko-reviewers
This modification relies on the shared memory implemented in Bug 1698045 and on
the ability to encode and decode self-hosted content from Bug 1668361 to
optimize the JS engine initialization by making the parent process encode the
self-hosted stencil, such that all other runtime initialization would only have
to decode it, including content processes.

Differential Revision: https://phabricator.services.mozilla.com/D110578
2021-05-12 13:57:56 +00:00
Andi-Bogdan Postelnicu eab549fd19 Bug 1519636 - Initial reformat of C/C++ code with clang-format version 12.0.0. r=sylvestre
clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D114211
2021-05-10 07:15:07 +00:00
Jon Coppeard 52d33f4288 Bug 1709849 - Replace use of JSGCInvocationKind with JS::GCOptions in the browser r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D114512
2021-05-07 07:39:50 +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
Olli Pettay 83625b981f Bug 1704068 - Enable test_multi_sharedWorker_lifetimes_bfcache.html on Fission, r=peterv,emilio
Differential Revision: https://phabricator.services.mozilla.com/D111403
2021-04-26 22:25:58 +00:00
Olli Pettay 3f1019dfd4 Bug 1704069 - Enable test_multi_sharedWorker_lifetimes_nobfcache.html on Fission, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D111402
2021-04-24 12:16:17 +00:00
Florian Quèze f64249ccd2 Bug 1705736 - Add 'Worker.postMessage' profiler markers and label frames to show which worker is involved, r=gerald,dom-worker-reviewers,asuth.
Differential Revision: https://phabricator.services.mozilla.com/D112361
2021-04-19 18:50:07 +00:00
Matthew Gaudet 43db0a7803 Bug 1699569 - Null terminate copied string under error condition r=evilpie,kmag
Differential Revision: https://phabricator.services.mozilla.com/D112047
2021-04-16 16:32:29 +00:00
Ryan Hunt f37dc5a46c Bug 1677204 - wasm: Factor out feature gating to declarative macro. r=lth
This commit adds a declarative `JS_FOR_WASM_FEATURES` macro which
expands for every WebAssembly proposal we are gating. Most feature
gating code is refactored to use this macro so that we have one place
we need to change to get the majority of this code working. The only
place that needs to be updated for new features is the browser pref
declaration code, as that cannot use this macro. This is documented
in the new WasmFeatures.h header.

The feature gating logic should work almost identically as before.
The changes are:
 * All browser prefs are moved to StaticPrefList.yaml
 * The code to enable a feature was conditionally compiled to not
   enable the feature at variously stages of the "flag-flow". Now
   the only place that is conditionally compiled to not work is
   in the WasmXFlag functions. This is to make the macro simpler
   and might be able to be reverted if need be.
 * The flag for gc is shortened from gcTypes to gc so that the
   existing usages of the wasmGcEnabled shell function don't have
   to change.

This commit also has the effect of giving function-references/gc/
exception-handling a proper browser pref for enabling the features.

Differential Revision: https://phabricator.services.mozilla.com/D110820
2021-04-09 20:03:51 +00:00
Ryan Hunt 90c8728cc9 Bug 1677204 - wasm: Remove multi-value flag. r=lth
Multi-value has shipped and can remove its feature flag.

Differential Revision: https://phabricator.services.mozilla.com/D110819
2021-04-09 20:03:51 +00:00
Andreas Farre 7e442f4c0e Bug 1701190 - Make sure that a current window context exists. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D111108
2021-04-09 12:03:52 +00:00
Andrew Sutherland a93d2bcc83 Bug 1701726 - Doc improvements for Remote and Shared workers. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D91887
2021-03-29 17:25:53 +00:00
Tim Huang 45630a2d30 Bug 1695050 - Part 4: Update the call-sites of CookieJarSettings::Create() for ServiceWorker and Worker. r=asuth
This patch updates all call-sites of CookieJarSettings::Create() to pass
the principal for ServiceWorker and Worker.

Differential Revision: https://phabricator.services.mozilla.com/D109047
2021-03-29 11:01:52 +00:00
Simon Giesecke 613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Florian Quèze 8ad1e5d0aa Bug 1699742 - Remove MOZ_GECKO_PROFILER ifdefs that are no longer needed, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D109078
2021-03-22 16:29:52 +00:00
Olli Pettay 07b2fa3d1a Bug 1689675 - Ensure dom/workers/test/test_suspend.html works with SHIP-BFCache r=nika
Depends on D109214

Differential Revision: https://phabricator.services.mozilla.com/D109215
2021-03-21 19:40:49 +00:00
Olli Pettay 1d331b7882 Bug 1689673 - Ensure dom/workers/test/test_subworkers_suspended.html works with SHIP-BFCache r=nika
Depends on D109213

Differential Revision: https://phabricator.services.mozilla.com/D109214
2021-03-21 19:40:48 +00:00
Ted Campbell af67fa6b2f Bug 1698473 - Ensure WASM prefs are read in workers. r=lth
The `dom::workerinternals::LoadContextOptions` must match the
`ReloadPrefsCallback` handler in order for workers to get the pref updates.

This patch add missing wasm_simd_wormhole and wasm_baselinejit options to
workers. This does change web behaviour but we always intended for the
workers to have same behaviour as main-thread for these two features.

Differential Revision: https://phabricator.services.mozilla.com/D108491
2021-03-15 19:23:52 +00:00
Eden Chuang 25a83eafa2 Bug 1684139 - Exclude ChromeWorkers from setTimeout/setInterval clamping. r=asuth
Exclude the chrome workers from setTimeout clamping for workers.

Depends on D105332

Differential Revision: https://phabricator.services.mozilla.com/D106606
2021-03-10 12:35:47 +00:00
Eden Chuang 53093e432c Bug 1684139 - Adding mozilla specific wpt for timer nesting level in workers r=dom-worker-reviewers,asuth
This patch is developed from D104136#3396152.

This patch creates WorkerTestUtils.webidl under dom/webidl for testing workers with internal APIs. These APIs are exposed to workers only and controlled by dom.workers.testing.enabled pref.

This patch creates a Mozilla-specific web-platform test, testing/web-platform/mozilla/test/workers/worker_timer_nesting_level.html, to test the timer nesting level implementation for workers.

To simplify the test implementation, this patch does not implement the webidl under dom/chrome-webidl/ suggested by D104136#3396152.

Depends on D104136

Differential Revision: https://phabricator.services.mozilla.com/D105332
2021-03-10 12:35:46 +00:00
Eden Chuang 9d5c5e771a Bug 1684139 - Implement timer nesting level for workers r=dom-worker-reviewers,asuth
This patch implements the timer nesting level for workers according to https://html.spec.whatwg.org/#timer-initialisation-steps.

If the timer's nesting level is larger than 5 and the interval time is less than 4, the timer should be clamped to 4.

Differential Revision: https://phabricator.services.mozilla.com/D104136
2021-03-10 12:35:46 +00:00
Simon Giesecke 7c6ccbe4a8 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-05 15:29:49 +00:00
Alexandru Michis 8c28934f09 Backed out changeset c6b72f3c76ba (bug 1676361) for causing bustages in nsSocketTransportService2.cpp
CLOSED TREE
2021-03-04 23:26:04 +02:00
Simon Giesecke e41d350c04 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 17:30:48 +00:00
Noemi Erli 11891059f7 Backed out changeset 06452c4c828c (bug 1676361) for causing bustages CLOSED TREE 2021-03-04 19:13:56 +02:00
Simon Giesecke 6c371fcc1c Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 16:14:44 +00:00
smolnar 9f8b74a18d Backed out changeset 9062e17fe15c (bug 1676361) on devs request. CLOSED TREE 2021-03-04 16:51:21 +02:00
Simon Giesecke e1330cc8f0 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 14:32:15 +00:00
Simon Giesecke 383ac52946 Bug 1696347 - Remove redundant nullptr checks of return value of infallible new in dom/workers. r=dom-worker-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D107179
2021-03-04 09:14:33 +00:00
Eden Chuang 45cd1a5356 Bug 1693967 - Avoid creating workers with the shutting down RuntimeService r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D106851
2021-03-02 09:57:41 +00:00
Edgar Chen e145a74d74 Bug 1681819 - Report usecounter when worker is in killing state; r=asuth
Previously, we report usecounter when clearing main event queue, but js execution
could still happen on the microtask after that. So defer the reporting to worker
is in killing state.

Differential Revision: https://phabricator.services.mozilla.com/D106769
2021-03-01 18:36:24 +00:00
Simon Giesecke 0b443059fd Bug 1693306 - Simplify some uses of LookupOrInsertWith by GetOrInsertNew. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D105479
2021-02-26 09:22:54 +00:00
Simon Giesecke 4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Mihai Alexandru Michis d1dca2c0a5 Backed out 2 changesets (bug 1684139) for causing xpcshell failures in test_subprocess.js
CLOSED TREE

Backed out changeset 52cfd9509136 (bug 1684139)
Backed out changeset 23e0fa285d90 (bug 1684139)
2021-02-25 14:47:15 +02:00
Eden Chuang bcc0d952de Bug 1684139 - Adding mozilla specific wpt for timer nesting level in workers r=dom-worker-reviewers,asuth
This patch is developed from D104136#3396152.

This patch creates WorkerTestUtils.webidl under dom/webidl for testing workers with internal APIs. These APIs are exposed to workers only and controlled by dom.workers.testing.enabled pref.

This patch creates a Mozilla-specific web-platform test, testing/web-platform/mozilla/test/workers/worker_timer_nesting_level.html, to test the timer nesting level implementation for workers.

To simplify the test implementation, this patch does not implement the webidl under dom/chrome-webidl/ suggested by D104136#3396152.

Depends on D104136

Differential Revision: https://phabricator.services.mozilla.com/D105332
2021-02-25 10:14:12 +00:00
Eden Chuang c426e61809 Bug 1684139 - Implement timer nesting level for workers r=dom-worker-reviewers,asuth
This patch implements the timer nesting level for workers according to https://html.spec.whatwg.org/#timer-initialisation-steps.

If the timer's nesting level is larger than 5 and the interval time is less than 4, the timer should be clamped to 4.

Differential Revision: https://phabricator.services.mozilla.com/D104136
2021-02-25 10:14:12 +00:00
Butkovits Atila 29688cfa2c Backed out 2 changesets (bug 1684139) for causing failures at test_subprocess.js. CLOSED TREE
Backed out changeset 209b51d63e6e (bug 1684139)
Backed out changeset 3a13a7b09c92 (bug 1684139)
2021-02-24 16:19:08 +02:00
Eden Chuang 00ad03a9c3 Bug 1684139 - Adding mozilla specific wpt for timer nesting level in workers r=dom-worker-reviewers,asuth
This patch is developed from D104136#3396152.

This patch creates WorkerTestUtils.webidl under dom/webidl for testing workers with internal APIs. These APIs are exposed to workers only and controlled by dom.workers.testing.enabled pref.

This patch creates a Mozilla-specific web-platform test, testing/web-platform/mozilla/test/workers/worker_timer_nesting_level.html, to test the timer nesting level implementation for workers.

To simplify the test implementation, this patch does not implement the webidl under dom/chrome-webidl/ suggested by D104136#3396152.

Depends on D104136

Differential Revision: https://phabricator.services.mozilla.com/D105332
2021-02-24 08:14:39 +00:00
Eden Chuang aed62c9971 Bug 1684139 - Implement timer nesting level for workers r=dom-worker-reviewers,asuth
This patch implements the timer nesting level for workers according to https://html.spec.whatwg.org/#timer-initialisation-steps.

If the timer's nesting level is larger than 5 and the interval time is less than 4, the timer should be clamped to 4.

Differential Revision: https://phabricator.services.mozilla.com/D104136
2021-02-24 08:14:39 +00:00