Commit graph

128 commits

Author SHA1 Message Date
roytam1
b59402a1f9 Merge remote-tracking branch 'origin/tracking' into custom 2025-07-16 15:39:18 +08:00
Francis Dominic Fajardo
c8608ad5cf Issue #2736 - Follow-up: Stop using worker thread-only functions for checking if CSP is enabled
Should stop the barrage of worker thread assertions on debug builds.
2025-07-16 15:21:31 +08:00
roytam1
7f3ccb5dc3 Merge remote-tracking branch 'origin/tracking' into custom 2025-05-27 23:22:51 +08:00
Moonchild
6da047af1e Issue #2736 - Follow-up: Remove erroneous workerthread CSP check.
In `OnStreamCompleteInternal` an incorrect workerthread CSP enabled check
was added. This was a duplicate check and this is actually on the main
thread so asserts the wrong thread for a `WorkerPref`.
2025-05-27 23:22:08 +08:00
roytam1
e72f8a3a81 Merge remote-tracking branch 'origin/tracking' into custom 2025-05-14 14:36:05 +08:00
Moonchild
53a6f6349d Issue #2736 - Part 14: Make CSP-enabled available to workers. 2025-05-14 14:35:35 +08:00
Moonchild
9ad680cfc4 Issue #2736 - Part 1: Provide more consistent principals to CSP.
We're currently fairly vague and inconsistent about the values we provide to
content policy implementations for requestOrigin and requestPrincipal. In some
cases they're the triggering principal, sometimes the loading principal,
sometimes the channel principal.

Our existing content policy implementations which require or expect a
loading principal currently retrieve it from the context node.
Since no current callers require the principal to be the loading
principal, and some already expect it to be the triggering principal
(which there's currently no other way to retrieve), a choice was made
to pass the triggering principal whenever possible, but use the loading
principal to determine the origin URL.
2025-05-14 14:21:46 +08:00
roytam1
6792dc4b66 Merge remote-tracking branch 'origin/tracking' into custom 2025-04-30 23:06:47 +08:00
Moonchild
0331e633bd Issue #2728 - Remove obsolete CSP referrer policy.
This has been superseded by the dedicated Referrer-policy header.
Resolves #2728
2025-04-30 22:58:43 +08:00
roytam1
2a53c574f6 Merge remote-tracking branch 'origin/tracking' into custom 2025-03-13 23:05:24 +08:00
Moonchild
2e4620b5af Issue #2692 - Part 6: Don't #include js/SourceBufferHolder.h in jsapi.h.
Instead, require users to do so. This is a minor translation-unit size
improvement for anyone who never has to use SourceBufferHolder other than
by reference.
2025-03-13 23:01:46 +08:00
roytam1
789327be17 Merge remote-tracking branch 'origin/tracking' into custom 2025-01-23 09:39:37 +08:00
FranklinDM
41eb02d1e1 No issue - Turn worker runnable assertion into something harmless in debug builds
It's annoying.
2025-01-23 09:37:42 +08:00
roytam1
904406a497 Merge remote-tracking branch 'origin/tracking' into custom 2025-01-20 21:13:46 +08:00
Moonchild
139e7a7ac6 Issue #2678 - Remove NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED
This no longer does anything at this point, except add indirection.
2025-01-20 21:12:18 +08:00
roytam1
310c05b97a Merge remote-tracking branch 'origin/tracking' into custom 2024-11-21 21:09:29 +08:00
Moonchild
ff89fee91d Issue #1787 - Remove nsIAppsService, mozIApplication and mozapp data cleanup. 2024-11-21 21:09:05 +08:00
Moonchild
7f086f216c Issue #2653 - Part 3: Remove support for packaged apps from asmjscache 2024-11-21 21:02:19 +08:00
Moonchild
7d978ccd71 Issue #2641 - Update Fetch to adhere to the updated spec (pass refpolicy)
Resolves #2641
2024-10-24 07:37:31 +08:00
roytam1
97fb5d7f9b ported from mozilla: Bug 1264792 - Update request'referrer policy when redirect.r=bkelly,dragana. (763507de3e) 2024-10-03 07:35:53 +08:00
roytam1
0d1cf674f0 Merge remote-tracking branch 'origin/tracking' into custom 2024-07-10 14:55:58 +08:00
Moonchild
7cc4dcb680 Issue #2546 - Part 6: Remove canvas.imagebitmap_extensions.enabled preference. 2024-07-10 14:51:38 +08:00
Moonchild
2b8d75e136 Issue #2546 - Part 2: Remove special FoxEye CreateImageBitmap method. 2024-07-10 14:50:16 +08:00
Moonchild
60fbaa2155 Issue #2546 - Part 1: Remove BufferSource support in CreateImageBitmap. 2024-07-10 14:50:00 +08:00
roytam1
f8f3b3ee43 Merge remote-tracking branch 'origin/tracking' into custom 2024-05-22 15:26:11 +08:00
Moonchild
22830d18cf [DOM] Clean up ReportLoadError and normalize error messages. 2024-05-22 15:21:54 +08:00
roytam1
5479b6d9c0 Merge remote-tracking branch 'origin/tracking' into custom 2024-04-11 15:58:11 +08:00
Martok
b518af4d45 [DOM] Simplify WorkerRunnable sanity checks and make them more readable. 2024-04-11 15:54:14 +08:00
roytam1
1804fcb5d1 Merge remote-tracking branch 'origin/tracking' into custom 2024-02-23 10:53:26 +08:00
Jens Stutte
d1b0f59de4 [DOM] Check if WorkerRunnable::Run runs on top of WorkerThreadPrimaryRunnable::Run in a worker thread. 2024-02-23 10:51:36 +08:00
Martok
0d51adc217 Issue #2453 - Follow-Up: Use hard-coded minimum timer interval in workers.
From the spec: "If nesting level is greater than 5, and timeout is less than 4, then set timeout to 4.",
therefore not having it user-configurable doesn't really break anything.
2024-02-23 10:49:39 +08:00
roytam1
b0345ff809 Merge remote-tracking branch 'origin/tracking' into custom 2024-01-18 10:17:09 +08:00
Martok
0efbc454b6 Issue #2452 - Fire events after iterating ServiceWorkerManager::mControlledDocuments is done.
https://bugzilla.mozilla.org/show_bug.cgi?id=1413466
2024-01-18 10:08:45 +08:00
Moonchild
aa2e80e571 Issue #2453 - Simplify CalculateTargetTime() code and fix typo.
We should always be on a worker thread so the MainThread call isn't
needed.
Also: DOMMinTimoutValue -> DOMMinTimeoutValue
2024-01-18 10:07:28 +08:00
Moonchild
4f83e877a8 Issue #2453 - Don't try to directly access pref on worker thread. 2024-01-18 10:06:43 +08:00
roytam1
80c4f1d745 Merge remote-tracking branch 'origin/tracking' into custom 2024-01-11 09:52:46 +08:00
Brian Smith
5b068f3726 Issue #2402 - CSP Violation events should have the correct sample for inline contexts. https://bugzilla.mozilla.org/show_bug.cgi?id=1473587 Add preference to increase max length of CSP report source sample. https://bugzilla.mozilla.org/show_bug.cgi?id=1415352 Return valid columnNumber value in CSP violation events. https://bugzilla.mozilla.org/show_bug.cgi?id=1418246 2024-01-11 09:50:12 +08:00
Brian Smith
e74612e23e Issue #2402 - Workers.setTimeout/setInterval must handle CSP rejections. https://bugzilla.mozilla.org/show_bug.cgi?id=1490165 Has some namespace issues adding the files, so differs slightly. 2024-01-11 09:47:22 +08:00
Brian Smith
b7abd4a127 Issue #2402 - Require ServiceWorkerGlobalScope.importScripts() to only accept JavaScript MIME types. https://bugzilla.mozilla.org/show_bug.cgi?id=1354577 Require ServiceWorkerContainer.register() to only accept JavaScript MIME types. 2024-01-11 09:46:26 +08:00
Brian Smith
5202c08cfb Issue #2402 - Don't call WorkerPrivate::WorkerName() to get service worker scope. https://bugzilla.mozilla.org/show_bug.cgi?id=1350433 2024-01-11 09:46:06 +08:00
Brian Smith
6979441734 Issue #2402 - importScripts should be governed by script-src in Web Workers. https://bugzilla.mozilla.org/show_bug.cgi?id=1322111 Add TYPE_INTERNAL_WORKER_IMPORT_SCRIPTS content policy. Update the Cache API schema to account for new nsIContentPolicy type. 2024-01-11 09:45:52 +08:00
Brian Smith
f8a174e19f Issue #2402 - Move WorkerPrivate::SetPrincipal() logic into a WorkerLoadInfo method. https://bugzilla.mozilla.org/show_bug.cgi?id=1333573 Make worker SetPrincipalOnMainThread fallible. https://bugzilla.mozilla.org/show_bug.cgi?id=1338523 2024-01-11 09:45:35 +08:00
Brian Smith
b723bb60ad Issue #2402 - Persist response headers for offlined service worker scripts. https://bugzilla.mozilla.org/show_bug.cgi?id=1337543 2024-01-11 09:45:19 +08:00
Brian Smith
15875f3d8c Issue #2402 - Apply CSP headers to ServiceWorker when loading offlined script. https://bugzilla.mozilla.org/show_bug.cgi?id=1337543 2024-01-11 09:44:42 +08:00
Brian Smith
37d4df19a8 Issue #2402 - Factor out code to set WorkerPrivate CSP from headers. https://bugzilla.mozilla.org/show_bug.cgi?id=1337543 2024-01-11 09:44:25 +08:00
Brian Smith
971fc4b838 Issue #2402 - Improve ServiceWorker asserts and verify load principal does not inherit CSP. https://bugzilla.mozilla.org/show_bug.cgi?id=1337543 2024-01-11 09:44:11 +08:00
Brian Smith
1703d936af Issue #2402 - ServiceWorker should not inherit CSP from registration principal. https://bugzilla.mozilla.org/show_bug.cgi?id=1337543 2024-01-11 09:43:57 +08:00
Brian Smith
bfa8ea9368 Issue #2402 - Sanitize the nsIPrincipal used to register a service worker to ensure CSP is not persisted. https://bugzilla.mozilla.org/show_bug.cgi?id=1337543 2024-01-11 09:43:42 +08:00
roytam1
d4a80aa2c4 Merge remote-tracking branch 'origin/tracking' into custom 2024-01-09 12:01:14 +08:00
Martok
65d72c5682 Issue #2435 - Add onrejectionhandled and onunhandledrejection EventHandler
Based-on: m-c 1362272
2024-01-09 12:00:14 +08:00