Commit graph

89 commits

Author SHA1 Message Date
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
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
Moonchild
22830d18cf [DOM] Clean up ReportLoadError and normalize error messages. 2024-05-22 15:21:54 +08:00
Martok
b518af4d45 [DOM] Simplify WorkerRunnable sanity checks and make them more readable. 2024-04-11 15:54:14 +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
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
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
Martok
65d72c5682 Issue #2435 - Add onrejectionhandled and onunhandledrejection EventHandler
Based-on: m-c 1362272
2024-01-09 12:00:14 +08:00
Martok
f059bb0a59 Issue #2240 - Align Microtasks and promises scheduling with spec
Microtasks, resolved Promises and Observers are handled after the sync
task that caused them, in the order they were generated.
Also simplifies reentrancy handling.

Based-on: m-c 1193394
2024-01-09 11:59:32 +08:00
Martok
73b14eae31 Issue #2435 - Make CycleCollectedJSContext.h dependency explicit 2024-01-09 11:59:09 +08:00
Moonchild
aae5866390 [DOM] Drop mWrappedRunnable early in workers.
This should prevent some intermittent crashes.
2023-10-26 10:53:41 +08:00
Moonchild
50ad087351 Issue #1721 - Implement GlobalPrivacyControl
(and get rid of failed DoNotTrack)
2023-10-18 10:17:23 +08:00
Brian Smith
46024cd872 Issue #1442 Follow-up: Stop pretending proxies have a JSNative call/construct hook. https://bugzilla.mozilla.org/show_bug.cgi?id=1471924 Part 1 Also remove an erroneous debug assert and guard against future issues. This fixes crashes on vk.com but still does not behave correctly. 2023-10-18 09:48:01 +08:00
Brian Smith
529bc13f05 Issue #1442 - Part 16 - Report stream errors during consumption. https://bugzilla.mozilla.org/show_bug.cgi?id=1128959 2023-10-04 10:02:10 +08:00
Brian Smith
842b9d47b3 Issue #1442 - Part 14 - Starting body consuming and passing the JSContext down from the binding entrypoints to where the ReadableStream could be read. https://bugzilla.mozilla.org/show_bug.cgi?id=1128959 2023-10-04 10:01:32 +08:00
Brian Smith
41216b88f6 Issue #1442 - Part 12a - Allow idle worker shutdown to begin for an opt-in WorkerHolder mode. https://bugzilla.mozilla.org/show_bug.cgi?id=1362444 Pre-requisite for Part 13. 2023-10-04 10:00:42 +08:00
Brian Smith
bff1f3bc60 Issue #1442 - Part 8: Fetch implementation of streams. https://bugzilla.mozilla.org/show_bug.cgi?id=1128959 +worker-friendly pref checking for the DOM API. 2023-10-04 09:55:06 +08:00
Brian Smith
62467428a3 Issue #1442 - Part 2: Add a run-time preference for toggling the streams API. https://bugzilla.mozilla.org/show_bug.cgi?id=1272697 2023-10-04 09:53:12 +08:00
Moonchild
2ca5715149 Issue #2323 - Part 3: Exclude chrome workers from worker timer clamping. 2023-10-03 22:04:09 +08:00
Moonchild
1b7df316c4 Issue #2323 - Part 2: Implement timer nesting and clamping for workers. 2023-10-03 22:03:54 +08:00
Martok
e0e1542913 Issue #2321 - Fall back to 0 if setInterval interval not supplied 2023-10-03 22:03:18 +08:00
Moonchild
50a4412750 Issue #2307 - Part 3: Remove SIMD.js support
This gets rid of the SIMD-specific scalar types in JS.
This considerably deviates from Mozilla's work because of our divergent
path.
2023-09-22 09:56:35 +08:00
Brian Smith
dd4c0a44b6 Issue #2282 - - Properly implement Performance Timeline Level 2 w3c spec. https://bugzilla.mozilla.org/show_bug.cgi?id=1539006 Do not throw from PerformanceObserver.observe when none of the entryTypes are known. https://bugzilla.mozilla.org/show_bug.cgi?id=1403027 Implement PerformanceObserver::takeRecords(). https://bugzilla.mozilla.org/show_bug.cgi?id=1436692 "server" is not a valid PerformanceEntry type. https://bugzilla.mozilla.org/show_bug.cgi?id=1463065 Fix a null ptr crash in PerformanceObserver::Observe. https://bugzilla.mozilla.org/show_bug.cgi?id=1631346 2023-08-08 09:42:31 +08:00
FranklinDM
bbcfb62753 Issue #2197 - Part 4: Expose structuredClone in Sandbox
Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1734320
2023-04-10 07:27:03 +08:00
FranklinDM
ef6b8db1d5 Issue #2197 - Part 3: Implement self.structuredClone()
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1722576
2023-04-10 07:26:49 +08:00
FranklinDM
4d58139fe1 Issue #2197 - Part 2c: Implement StructuredSerializeOptions for ServiceWorker
Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1502802
2023-04-10 07:26:05 +08:00
FranklinDM
158784cbed Issue #2197 - Part 2b: Implement StructuredSerializeOptions for Worker
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1502802
2023-04-10 07:25:49 +08:00
FranklinDM
47147d58b0 Issue #2197 - Part 1b: Transferables should be arrays of objects
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1336020
2023-04-10 07:25:20 +08:00
FranklinDM
438cdbd913 Issue #2197 - Part 1a: postMessages should have transferable as [] by default
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1336020
2023-04-10 07:25:03 +08:00
Moonchild
5dfded811d Issue #80 - reinstated unified building for some large chunks of our code.
This should reduce compile complexity saving time and reducing linker stress.
2022-09-07 10:36:23 +08:00
Moonchild
8d800b1cb0 Issue #21 - Remove Telemetry plumbing and fix build.
Note this won't give working applications. Requires FE changes and
additional js module changes (next part).
2022-04-28 10:25:48 +08:00
Moonchild
a94d85142d [DOM] worker cleanup. 2022-03-22 23:13:14 +08:00
Moonchild
a63ec9a479 [DOM] Consistent error messages for scripts which failed to load. 2022-03-22 23:12:48 +08:00