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

1250 Коммитов

Автор SHA1 Сообщение Дата
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
Sandor Molnar 68afd87d02 Backed out 8 changesets (bug 1744025) for causing bp-hybrid bustages in dom/clients/api/Clients.cpp. CLOSED TREE
Backed out changeset b6452430763d (bug 1744025)
Backed out changeset 46e9f06636da (bug 1744025)
Backed out changeset 913cdee4824f (bug 1744025)
Backed out changeset e1bc4e2066c7 (bug 1744025)
Backed out changeset e6b99af4b7ca (bug 1744025)
Backed out changeset e9b749f80ec2 (bug 1744025)
Backed out changeset 26d3176a00ef (bug 1744025)
Backed out changeset 2c8941fdcee5 (bug 1744025)
2021-12-08 01:30:06 +02:00
Jens Stutte 07505034ba Bug 1744025: Use CheckedUnsafePtr<WorkerPrivate> in WorkerPrivate where possible. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D132710
2021-12-07 16:47:15 +00:00
Jens Stutte d53627390a Bug 1744025: Use CheckedUnsafePtr<WorkerPrivate> in WorkerGlobalScopeBase. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D132709
2021-12-07 16:47:15 +00:00
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
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 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
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
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
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
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
criss 0ecd4a450b Backed out 6 changesets (bug 1732161) for causing linux base toolchains bustages. CLOSED TREE
Backed out changeset 766a1bc74001 (bug 1732161)
Backed out changeset aed63de28354 (bug 1732161)
Backed out changeset 98eaff0d5124 (bug 1732161)
Backed out changeset 76c21ec8ffb6 (bug 1732161)
Backed out changeset 49dcac272f05 (bug 1732161)
Backed out changeset 67d81f8f413e (bug 1732161)
2021-10-14 05:38:08 +03:00
Steve Fink 0457cf4744 Bug 1732161 - Track CCReason for all cycle collections (replacing ccType) r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126395
2021-10-13 22:32:59 +00:00
Narcis Beleuzu a92083a114 Backed out 6 changesets (bug 1732161) for build bustages on nsCycleCollectionParticipant.h CLOSED TREE
Backed out changeset 7271b938e71a (bug 1732161)
Backed out changeset d24b8450b7ed (bug 1732161)
Backed out changeset fb1838a152f2 (bug 1732161)
Backed out changeset 84787a58a428 (bug 1732161)
Backed out changeset 6acb82c0ac3c (bug 1732161)
Backed out changeset 50d17b172185 (bug 1732161)
2021-10-12 07:13:13 +03:00
Steve Fink 8db934daff Bug 1732161 - Track CCReason for all cycle collections (replacing ccType) r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126395
2021-10-11 21:39:08 +00:00
Butkovits Atila 2ff5314530 Backed out 6 changesets (bug 1732161) for causing assertion failures in CCGCScheduler.h. CLOSED TREE
Backed out changeset 88dbe1a7478c (bug 1732161)
Backed out changeset a5a2c9c53340 (bug 1732161)
Backed out changeset d83b36b92051 (bug 1732161)
Backed out changeset b339e54078d7 (bug 1732161)
Backed out changeset 0cbf901cab8b (bug 1732161)
Backed out changeset b3e894d590d9 (bug 1732161)
2021-10-05 03:47:08 +03:00
Steve Fink 7e1eb8957d Bug 1732161 - Track CCReason for all cycle collections (replacing ccType) r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D126395
2021-10-04 23:06:08 +00:00
Tim Huang 8cdcc3ac79 Bug 1731557 - Part 2: Modify the antitracking code to use the nsILoadInfo.storagePermission. r=pbz
After we change the old nsILoadInfo.hasStoragePermission, we need to
modify the code that is using it.

Differential Revision: https://phabricator.services.mozilla.com/D126277
2021-09-27 22:50:41 +00:00
Olli Pettay fba105d5de Bug 1714228, clear worker refs even if the Worker never runs, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D125614
2021-09-16 14:11:34 +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
Olli Pettay 5beba99004 Bug 1724777, optimize suppressed MicroTask handling, r=mccr8
The test is in theory racy, but trying to limit the cases when it might behave badly
by running it on opt desktop builds only. Without the patch the 'period' check takes over 400ms locally and with the
patch 1-3ms.

The changes are just trying to optimize execution, not change the behavior.
Use of SuppressedMicroTasks is perhaps a bit odd, but it helps keeping
SavedMicroTaskQueue and similar code simple.

Differential Revision: https://phabricator.services.mozilla.com/D122290
2021-08-12 16:01:08 +00:00
Kagami Sascha Rosylight a5c1c0a660 Bug 1723050 - Part 33: Replace typedef by using in dom/workers/ r=dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D121331
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 0672b9f476 Bug 1723050 - Part 33: Replace typedef by using in dom/workers/ r=dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D121331
2021-08-11 09:10:25 +00:00
Jens Stutte 6c225e7975 Bug 1720568: Be more explicit about the WorkerPrivate self-reference. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D120630
2021-07-24 10:04:55 +00:00
Eden Chuang 7b948f8c6c Bug 1712593 - Adding diagnostic assertion for unexpected WorkerPrivate deletion. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D118480
2021-07-15 19:24:46 +00:00
Tooru Fujisawa 8f6310e25c Bug 1708450 - Move call and construct functions into js/public/CallAndConstruct.h. r=nbp
Depends on D119619

Differential Revision: https://phabricator.services.mozilla.com/D119620
2021-07-13 11:52:43 +00:00
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