Navigation Menu

Skip to content

Commit

Permalink
Ensure JS runnables are dispatched to a worker's event loop instead o…
Browse files Browse the repository at this point in the history
…f its parent.
  • Loading branch information
jdm committed Nov 22, 2019
1 parent 1b524ea commit 0f30755
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 271 deletions.
12 changes: 8 additions & 4 deletions components/script/dom/dedicatedworkerglobalscope.rs
Expand Up @@ -347,10 +347,14 @@ impl DedicatedWorkerGlobalScope {

let runtime = unsafe {
if let Some(pipeline_id) = pipeline_id {
new_child_runtime(
parent,
Some(NetworkingTaskSource(parent_sender.clone(), pipeline_id)),
)
let task_source = NetworkingTaskSource(
Box::new(WorkerThreadWorkerChan {
sender: own_sender.clone(),
worker: worker.clone(),
}),
pipeline_id,
);
new_child_runtime(parent, Some(task_source))
} else {
new_child_runtime(parent, None)
}
Expand Down
22 changes: 0 additions & 22 deletions tests/wpt/metadata/wasm/jsapi/constructor/compile.any.js.ini

This file was deleted.

This file was deleted.

70 changes: 0 additions & 70 deletions tests/wpt/metadata/wasm/jsapi/constructor/instantiate.any.js.ini
Expand Up @@ -10,82 +10,12 @@


[instantiate.any.worker.html]
expected: CRASH
[Invalid arguments]
expected: NOTRUN

[exports and imports: buffer argument]
expected: FAIL

[Invalid code]
expected: NOTRUN

[BufferSource argument]
expected: FAIL

[Branding]
expected: TIMEOUT

[exports and imports: Module argument]
expected: NOTRUN

[Module argument]
expected: FAIL

[Changing the buffer]
expected: NOTRUN

[Empty module with undefined imports argument: BufferSource argument]
expected: NOTRUN

[getter order for imports object: BufferSource argument]
expected: NOTRUN

[Empty module without imports argument: BufferSource argument]
expected: NOTRUN

[Empty module with empty imports argument: BufferSource argument]
expected: NOTRUN

[No imports: Module argument]
expected: NOTRUN

[Empty module with undefined imports argument: Module argument]
expected: NOTRUN

[exports and imports: BufferSource argument]
expected: NOTRUN

[imports: Module argument]
expected: NOTRUN

[Empty module without imports argument: Module argument]
expected: NOTRUN

[No imports: BufferSource argument]
expected: NOTRUN

[Empty module with empty imports argument: Module argument]
expected: NOTRUN

[imports: BufferSource argument]
expected: NOTRUN

[getter order for imports object: Module argument]
expected: NOTRUN

[stray argument: BufferSource argument]
expected: NOTRUN

[stray argument: Module argument]
expected: NOTRUN

[Empty buffer]
expected: NOTRUN

[Synchronous options handling: Module argument]
expected: NOTRUN

[Synchronous options handling: Buffer argument]
expected: NOTRUN

@@ -1,13 +1,12 @@
[multi-value.any.worker.html]
expected: CRASH
[multiple return values from wasm to js]
expected: TIMEOUT
expected: FAIL

[multiple return values inside wasm]
expected: NOTRUN
expected: FAIL

[multiple return values from js to wasm]
expected: NOTRUN
expected: FAIL


[multi-value.any.html]
Expand Down
Expand Up @@ -5,7 +5,6 @@


[nested-worker-success.any.worker.html]
expected: CRASH
[postMessaging to a dedicated sub-worker allows them to see each others' modifications]
expected: TIMEOUT
expected: FAIL

0 comments on commit 0f30755

Please sign in to comment.