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

103 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 25c0d10932 Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
Markus Stange fa8bfb6bc7 Bug 1851263 - Rename nsIGlobalObject::AsInnerWindow to GetAsInnerWindow because it can return null. r=smaug
This is also the name that was originally suggested in https://bugzilla.mozilla.org/show_bug.cgi?id=218415#c53 .

Differential Revision: https://phabricator.services.mozilla.com/D187340
2023-09-04 04:06:30 +00:00
Eden Chuang ea1bf2603a Bug 1800659 - P3 Remove WorkerPrivate::ClearMainEventQueue() r=asuth,smaug
Pending->Canceling->Killing (WorkerNeverRan)

Need to clear WorkerPrivate::mPreStartRunnables

Could we call WorkerRunnable::WorkerRun() to release resource? There could be no WorkerGlobalScope...

Pending->Running->Closing->Canceling->Killing(WorkerRan)
Pending->Running->Canceling->Killing(WorkerRan)

When entering “Closing”
1. Keeping receives normal WorkerRunnables
2. Making ParentStatus as Closing
3. Cancel all timeout
4. Don’t clear the main event queue anymore. But we still wait for all SyncLoops be completed.
5. Call WorkerGlobalScope::NoteTerminating() and nsIGlobalObject::DisconnectEventTargetObjects().
6. Switching to “Canceling” by asking parent thread to call WorkerPrivate::Cancel()

When entering “Canceling”
1. Call WorkerGlobalScope::NoteTerminating()
2. Notify StrongWorkerRefs, worker is in “Canceling”, send and complete the corresponding shutdown work right now.
3. Executing all runnables until no normal WorkerRunnables in queue and no WorkerRefs, SyncLoops and children workers
4. Stop receiving normal WorkerRunnables and DisconnectEventTargetObjects of WorkerScope.
4. Entering “Killing”

When entering “Killing”
1. We would not notify WorkerRefs anymore. Logically all WorkerRefs should be released in “Canceling”
2. Executing all remaining ControlRunnables
3. Release corresponding resources of Worker on worker thread.

Depends on D173850

Differential Revision: https://phabricator.services.mozilla.com/D177511
2023-06-06 06:36:50 +00:00
Tom Schuster 0119f3c072 Bug 1834737 - Make RFPTarget parameter of nsIGlobalObject::ShouldResistFingerprinting non-optional. r=tjr,media-playback-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D178924
2023-05-31 09:46:53 +00:00
Emilio Cobos Álvarez d27874678a Bug 1811950 - Allow WorkerGlobalScope.fonts to fail. r=aosmond,webidl,saschanaz
It can fail when canceling the worker (though I couldn't reproduce the
crash locally). Some things were already accounting for it.

Rename some things for consistency.

Differential Revision: https://phabricator.services.mozilla.com/D175126
2023-04-11 13:44:53 +00:00
Tom Ritter 4b30551afe Bug 1815307: Make all ShouldRFP functions take a RTPTarget r=timhuang
The default value for the target is Unknown, so all callsites
keep working.

We also add a Target value used for Document precomputation. This
value is enabled in RFP Lite mode, and allows us to precompute
ShouldRFP and cache it for faster computations later.  (The later
computations will still check the Target, but won't need to do the
other expensive checks.)

Differential Revision: https://phabricator.services.mozilla.com/D170891
2023-03-21 14:14:48 +00:00
Tom Ritter f05d61003f Bug 1815307: Reconfigure the headers so types will be accessible in the right place without conflicts r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D170890
2023-03-21 14:14:47 +00:00
Cristina Horotan d376603a21 Backed out 7 changesets (bug 1815307) for causing mochitest failures at test_bug1729861.html CLOSED TREE
Backed out changeset 18c8ae091952 (bug 1815307)
Backed out changeset df49c162e4ad (bug 1815307)
Backed out changeset a22d49909ffa (bug 1815307)
Backed out changeset 371d1d626984 (bug 1815307)
Backed out changeset 7f4b594cf468 (bug 1815307)
Backed out changeset 83d79fcbded5 (bug 1815307)
Backed out changeset 337dfbf6a1f9 (bug 1815307)
2023-03-16 17:51:56 +02:00
Tom Ritter 73c477c80e Bug 1815307: Make all ShouldRFP functions take a RTPTarget r=timhuang
The default value for the target is Unknown, so all callsites
keep working.

We also add a Target value used for Document precomputation. This
value is enabled in RFP Lite mode, and allows us to precompute
ShouldRFP and cache it for faster computations later.  (The later
computations will still check the Target, but won't need to do the
other expensive checks.)

Differential Revision: https://phabricator.services.mozilla.com/D170891
2023-03-16 13:53:13 +00:00
Tom Ritter 9845605d37 Bug 1815307: Reconfigure the headers so types will be accessible in the right place without conflicts r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D170890
2023-03-16 13:53:12 +00:00
Tom Schuster 1d0c52ff34 Bug 1810964 - Replace callers of nsContentUtils::ResistFingerprinting. r=tjr,emilio
Differential Revision: https://phabricator.services.mozilla.com/D167169
2023-01-23 11:52:56 +00:00
Nika Layzell 8332c88faa Bug 1806709 - Part 2: Clean up some trivial nsIPrincipal helper methods from nsIGlobalObject, r=asuth
These methods only existed because nsIGlobalObject::PrincipalOrNull was not
available off-main-thread, so can now be removed.

Depends on D165198

Differential Revision: https://phabricator.services.mozilla.com/D165199
2022-12-21 15:53:22 +00:00
Jan Varga e95f3b4eec Bug 1791867 - Add GetStorageManager to nsIGlobalObject; r=smaug,dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D157902
2022-11-30 09:51:14 +00:00
Otto Länd cda6577f9f No bug: apply code formatting via Lando
# ignore-this-changeset
2022-11-29 13:46:10 +00:00
Tom Ritter 39b2fec75c Bug 1778510: Add RTPCallerType to GlobalObject r=asuth
This centralizes the logic in one place.

In order to do this, we will need to check the principal
off-main thread. (Well, we need to know if it's System
Principal.)  Worker and Worklet need special ways to do
this, so create a virtual method for it and let them
override it.  This is analogous to the ShouldRFP method
on GlobalObject.

Differential Revision: https://phabricator.services.mozilla.com/D157564
2022-11-29 13:34:15 +00:00
Tom Ritter 9a5f52f41e Bug 1778510: Require subclasses of nsIGlobalObject implement ShouldRFP r=asuth
For the less common subclasses we will hardcode a choice to always obey
RFP if the pref is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D157562
2022-11-29 13:34:12 +00:00
Butkovits Atila cb853b7f77 Backed out 33 changesets (bug 1778510) for causing build bustages at nsIGlobalObject.h. CLOSED TREE
Backed out changeset f2a53c9e497c
Backed out changeset 59350ca6f3f2 (bug 1778510)
Backed out changeset abbba7e72b57 (bug 1778510)
Backed out changeset 6cf7473afae8 (bug 1778510)
Backed out changeset 74fb5fed93ea (bug 1778510)
Backed out changeset 5b5dc70cdd0a (bug 1778510)
Backed out changeset ff93191cafd2 (bug 1778510)
Backed out changeset 39cc006b610c (bug 1778510)
Backed out changeset dfaef3ad17a9 (bug 1778510)
Backed out changeset 8fbabeb8244b (bug 1778510)
Backed out changeset 45051b62e3f1 (bug 1778510)
Backed out changeset 86c0923fd81f (bug 1778510)
Backed out changeset a49c0f69d519 (bug 1778510)
Backed out changeset cfad733d4aaf (bug 1778510)
Backed out changeset df6d0fe89d5b (bug 1778510)
Backed out changeset 704db76eab17 (bug 1778510)
Backed out changeset 0651c128e369 (bug 1778510)
Backed out changeset 1e650de647c0 (bug 1778510)
Backed out changeset fa15a3572741 (bug 1778510)
Backed out changeset 4ceffd409eae (bug 1778510)
Backed out changeset 47db43142c62 (bug 1778510)
Backed out changeset ebb21153aaac (bug 1778510)
Backed out changeset a87eaaec3f9c (bug 1778510)
Backed out changeset 43ad5ee21f79 (bug 1778510)
Backed out changeset 5f20af8e1263 (bug 1778510)
Backed out changeset b78576875db0 (bug 1778510)
Backed out changeset d801fdeac90b (bug 1778510)
Backed out changeset 5af032c628c0 (bug 1778510)
Backed out changeset 86aa59de11b4 (bug 1778510)
Backed out changeset 58642357a19c (bug 1778510)
Backed out changeset c575e824e291 (bug 1778510)
Backed out changeset 32a358de4843 (bug 1778510)
Backed out changeset 40e0708c01e7 (bug 1778510)
2022-11-28 23:14:52 +02:00
Otto Länd e89fe78030 No bug: apply code formatting via Lando
# ignore-this-changeset

Output from `mach lint`:

error: problem with lint setup, skipping android-api-lint, android-checkstyle, android-format, android-javadoc, android-lint, android-test
✖ 0 problems (0 errors, 4 warnings, 4 fixed)
2022-11-28 18:10:06 +00:00
Tom Ritter d54e4c9877 Bug 1778510: Add RTPCallerType to GlobalObject r=asuth
This centralizes the logic in one place.

In order to do this, we will need to check the principal
off-main thread. (Well, we need to know if it's System
Principal.)  Worker and Worklet need special ways to do
this, so create a virtual method for it and let them
override it.  This is analogous to the ShouldRFP method
on GlobalObject.

Differential Revision: https://phabricator.services.mozilla.com/D157564
2022-11-28 18:04:07 +00:00
Tom Ritter 1f9c192cbf Bug 1778510: Require subclasses of nsIGlobalObject implement ShouldRFP r=asuth
For the less common subclasses we will hardcode a choice to always obey
RFP if the pref is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D157562
2022-11-28 18:04:04 +00:00
Cosmin Sabou d245f666b9 Backed out 33 changesets (bug 1778510) for causing bp-hybrid bustages on nsIPrincipal.h. CLOSED TREE
Backed out changeset 282f589ede4a
Backed out changeset e23d03ba5a89 (bug 1778510)
Backed out changeset cbdb34cf7c8d (bug 1778510)
Backed out changeset d9a54521f3fb (bug 1778510)
Backed out changeset f5b7f8ce38b0 (bug 1778510)
Backed out changeset eb64607765a9 (bug 1778510)
Backed out changeset 18291e692834 (bug 1778510)
Backed out changeset bb71cc94a8be (bug 1778510)
Backed out changeset 507e84e1dafe (bug 1778510)
Backed out changeset 6d42e7a083ac (bug 1778510)
Backed out changeset 53799e6a46dd (bug 1778510)
Backed out changeset ff20d709839a (bug 1778510)
Backed out changeset 328d4d2df591 (bug 1778510)
Backed out changeset 9ba44fd8a440 (bug 1778510)
Backed out changeset eb1b7e30e519 (bug 1778510)
Backed out changeset c0927de6153b (bug 1778510)
Backed out changeset 02a306acd093 (bug 1778510)
Backed out changeset 2c5eecc4ad4c (bug 1778510)
Backed out changeset 38a9f45c9621 (bug 1778510)
Backed out changeset 35b7c7df62ce (bug 1778510)
Backed out changeset 187d71f42593 (bug 1778510)
Backed out changeset 450f4ccd6cd0 (bug 1778510)
Backed out changeset 915149e27da0 (bug 1778510)
Backed out changeset 9c6e85369f15 (bug 1778510)
Backed out changeset c6a9fe0ce713 (bug 1778510)
Backed out changeset a2f00462157e (bug 1778510)
Backed out changeset 5278e40b80c3 (bug 1778510)
Backed out changeset dba220581d93 (bug 1778510)
Backed out changeset 17a63044b0dc (bug 1778510)
Backed out changeset 68d607aaa121 (bug 1778510)
Backed out changeset e93004f91f6f (bug 1778510)
Backed out changeset 41d6d9f889e1 (bug 1778510)
Backed out changeset 28ac62019086 (bug 1778510)
2022-11-28 07:34:46 +02:00
Otto Länd d06afffa71 No bug: apply code formatting via Lando
# ignore-this-changeset

Output from `mach lint`:

requesting all changes
adding changesets
adding manifests
adding file changes
added 14948 changesets with 20627 changes to 1598 files
new changesets 90d04a36eef7:41a33c3f2719
updating to branch default
325 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
error: problem with lint setup, skipping android-api-lint, android-checkstyle, android-format, android-javadoc, android-lint, android-test
✖ 0 problems (0 errors, 4 warnings, 4 fixed)
2022-11-28 04:26:20 +00:00
Tom Ritter 3e82dba9f2 Bug 1778510: Add RTPCallerType to GlobalObject r=asuth
This centralizes the logic in one place.

In order to do this, we will need to check the principal
off-main thread. (Well, we need to know if it's System
Principal.)  Worker and Worklet need special ways to do
this, so create a virtual method for it and let them
override it.  This is analogous to the ShouldRFP method
on GlobalObject.

Differential Revision: https://phabricator.services.mozilla.com/D157564
2022-11-28 04:21:26 +00:00
Tom Ritter c6dbdf3adf Bug 1778510: Require subclasses of nsIGlobalObject implement ShouldRFP r=asuth
For the less common subclasses we will hardcode a choice to always obey
RFP if the pref is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D157562
2022-11-28 04:21:24 +00:00
Jan Varga 7390297678 Bug 1790207 - Fix the function for comparing storage keys; r=dom-storage-reviewers,jesup,asuth
Differential Revision: https://phabricator.services.mozilla.com/D162089
2022-11-15 17:13:02 +00:00
Jan Varga f40ce49b02 Bug 1790207 - Forward declaration of mozilla::Result in nsIGlobalObject.h and other cleanup; r=dom-storage-reviewers,jesup
Depends on D162087

Differential Revision: https://phabricator.services.mozilla.com/D162088
2022-11-15 17:13:02 +00:00
Randell Jesup 229303901a Bug 1790207: Provide cross-origin security checks for OPFS r=nika,asuth
Differential Revision: https://phabricator.services.mozilla.com/D157892
2022-11-15 17:13:01 +00:00
Andrew Osmond 508ecd766a Bug 1072107 - Part 2. Expose FontFaceSet on nsIGlobalObject. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D149245
2022-07-07 21:24:08 +00:00
Kagami Sascha Rosylight 469b0c1c65 Bug 1768189 - Part 4: Apply modernize-concat-nested-namespaces to dom/base/TimeoutHandler.h ... r=andi
Depends on D145737

Differential Revision: https://phabricator.services.mozilla.com/D145738
2022-05-09 20:41:04 +00:00
Matthew Gaudet d07e459e7b Bug 1757241 - Remove !MOZ_DOM_STREAMS code from most files r=smaug
I've also tested to verify that JS Streams remains enabled in the JS Shell package

Differential Revision: https://phabricator.services.mozilla.com/D142620
2022-04-13 18:57:48 +00:00
Jon Coppeard 050bae2fd0 Bug 1759881 - Part 7: Add a virtual method to get the module loader to use for the current global r=yulia,smaug
This adds a virtual method to  nsIGlobalObject and implements it for
nsGlobalWindowInner and SandboxPrivate. This means we don't have to put the
logic for dealing with all the different kinds of globals in once place.

Differential Revision: https://phabricator.services.mozilla.com/D141733
2022-03-28 12:38:27 +00:00
Emilio Cobos Álvarez 2dd7088690 Bug 1759163 - Add origin trial support for worklets. r=asuth
Move the trial getter to nsIGlobalObject, make every implementation
provide a reasonable value, and add a test.

Differential Revision: https://phabricator.services.mozilla.com/D140848
2022-03-15 23:16:14 +00:00
Marian-Vasile Laza f0b42c159c Backed out changeset 558e256fcb31 (bug 1759163) for causing mochitest failures on test_header_simple.html. 2022-03-15 15:23:04 -07:00
Emilio Cobos Álvarez 7961a431ef Bug 1759163 - Add origin trial support for worklets. r=asuth
Move the trial getter to nsIGlobalObject, make every implementation
provide a reasonable value, and add a test.

Differential Revision: https://phabricator.services.mozilla.com/D140848
2022-03-15 17:50:03 +00:00
Matthew Gaudet 468748a0bd Bug 1743207 - Implement ByteLengthQueuingStrategy interface r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134084
2022-01-13 19:01:20 +00:00
Tom Schuster 2f32241884 Bug 1734239 - Implement the CountQueuingStrategy size function. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134916
2022-01-05 19:31:04 +00:00
Mirko Brodesser 6aaf4de454 Bug 1746870: part 2) Add minor documentation to `nsIGlobalObject`. r=hsivonen
Depends on D134287

Differential Revision: https://phabricator.services.mozilla.com/D134288
2021-12-21 09:46:17 +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 f07b669434 Bug 1726157 - Add GetStorageAccess to nsIGlobalObject r=asuth,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D123145
2021-09-24 06:06:51 +00:00
Marian-Vasile Laza 6f50b58711 Backed out changeset be76cb91e85a (bug 1726157) for causing xpcshell failures on test_ext_cache_api.js. CLOSED TREE 2021-09-23 13:04:56 +03:00
Kagami Sascha Rosylight 2094595971 Bug 1726157 - Add GetStorageAccess to nsIGlobalObject r=asuth,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D123145
2021-09-23 08:49:56 +00:00
Andrea Marchesini 3a6775ecf7 Bug 1630947 - Update Reporting API - part 1 - ReportingObserver in workers, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D71317
2020-04-18 12:25:57 +00:00
Cosmin Sabou 948e626a26 Backed out 2 changesets (bug 1630947) for causing build bustages on ReportingObserver.cpp. CLOSED TREE
Backed out changeset 18c357daf0f7 (bug 1630947)
Backed out changeset 6bfed9f2487d (bug 1630947)
2020-04-17 23:16:58 +03:00
Andrea Marchesini aaa72f6ebb Bug 1630947 - Update Reporting API - part 1 - ReportingObserver in workers, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D71317
2020-04-17 19:55:28 +00:00
Tom Tung 40713479b2 Bug 1586761 - P1 - Expose CrossOriginIsolated to nsIGlobalObject; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D63238

--HG--
extra : moz-landing-system : lando
2020-03-25 13:53:46 +00:00
Andrew Sutherland 940bf90242 Bug 1545345 - Improve worker shutdown. r=baku,smaug
Differential Revision: https://phabricator.services.mozilla.com/D65132

--HG--
extra : moz-landing-system : lando
2020-03-27 22:40:58 +00:00
Ciure Andrei 2c62d81ee6 Backed out changeset 1911a0d1e751 (bug 1545345) for causing CallbackObject.cpp bustages CLOSED TREE 2020-03-27 21:47:15 +02:00
Andrew Sutherland 40755c31a8 Bug 1545345 - Improve worker shutdown. r=baku,smaug
Differential Revision: https://phabricator.services.mozilla.com/D65132

--HG--
extra : moz-landing-system : lando
2020-03-27 17:36:20 +00:00
Csoregi Natalia cb7b1f507b Backed out changeset e608cbaf20d4 (bug 1545345) for assertion failures on WorkerPrivate.cpp. CLOSED TREE 2020-03-27 07:55:21 +02:00