Auto merge of #24842 - servo:jdm-patch-34, r=nox

Make JS runnables for workers execute on correct event loop

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24812
This commit is contained in:
bors-servo 2019-11-26 09:33:59 -05:00 committed by GitHub
commit 7a72f8a168
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 271 deletions

View file

@ -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)
}

View file

@ -1,22 +0,0 @@
[compile.any.worker.html]
expected: CRASH
[Invalid code]
expected: NOTRUN
[Branding]
expected: TIMEOUT
[Result type]
expected: NOTRUN
[Changing the buffer]
expected: NOTRUN
[Stray argument]
expected: NOTRUN
[Empty buffer]
expected: NOTRUN
[compile.any.html]

View file

@ -1,169 +0,0 @@
[instantiate-bad-imports.any.html]
[instantiate-bad-imports.any.worker.html]
expected: CRASH
[WebAssembly.instantiate(buffer): Imports argument with missing property: wrong property]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing memory with an incorrectly-typed value: 1]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing memory with an incorrectly-typed value: undefined]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a function with an incorrectly-typed value: true]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing memory with an incorrectly-typed value: ""]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing an i64 global]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a function with an incorrectly-typed value: NaN]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Non-object module: 1]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a global with an incorrectly-typed value: symbol "Symbol()"]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing memory with an incorrectly-typed value: WebAssembly.Memory.prototype]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a function with an incorrectly-typed value: 0.1]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a function with an incorrectly-typed value: object "[object Object\]"]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a global with an incorrectly-typed value: WebAssembly.Global.prototype]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing memory with an incorrectly-typed value: symbol "Symbol()"]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing table with an incorrectly-typed value: 0.1]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing table with an incorrectly-typed value: true]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Imports argument with missing property: undefined]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing table with an incorrectly-typed value: ""]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a function with an incorrectly-typed value: symbol "Symbol()"]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Imports argument with missing property: empty object]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Non-object module: 0.1]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a global with an incorrectly-typed value: true]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Non-object module: NaN]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Non-object module: true]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a global with an incorrectly-typed value: null]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a global with an incorrectly-typed value: Object.create(WebAssembly.Global.prototype)]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a function with an incorrectly-typed value: undefined]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Missing imports argument]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing memory with an incorrectly-typed value: null]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing table with an incorrectly-typed value: Object.create(WebAssembly.Table.prototype)]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Non-object module: undefined]
expected: TIMEOUT
[WebAssembly.instantiate(buffer): Importing table with an incorrectly-typed value: WebAssembly.Table]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Non-object module: ""]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a function with an incorrectly-typed value: ""]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing table with an incorrectly-typed value: plain object]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a global with an incorrectly-typed value: plain object]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a function with an incorrectly-typed value: 1]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing table with an incorrectly-typed value: null]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing table with an incorrectly-typed value: undefined]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing table with an incorrectly-typed value: 1]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing table with an incorrectly-typed value: WebAssembly.Table.prototype]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing memory with an incorrectly-typed value: Object.create(WebAssembly.Memory.prototype)]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing memory with an incorrectly-typed value: 0.1]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing memory with an incorrectly-typed value: true]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a global with an incorrectly-typed value: WebAssembly.Global]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Non-object module: symbol "Symbol()"]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing memory with an incorrectly-typed value: NaN]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a global with an incorrectly-typed value: ""]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a global with an incorrectly-typed value: undefined]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing table with an incorrectly-typed value: NaN]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing a function with an incorrectly-typed value: null]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Non-object module: null]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing memory with an incorrectly-typed value: plain object]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing table with an incorrectly-typed value: symbol "Symbol()"]
expected: NOTRUN
[WebAssembly.instantiate(buffer): Importing memory with an incorrectly-typed value: WebAssembly.Memory]
expected: NOTRUN

View file

@ -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

View file

@ -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]

View file

@ -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