diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-11-20 16:16:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-20 16:16:13 -0500 |
commit | dc22a78cc28a06e4192414974722748a034c93f1 (patch) | |
tree | 1d1f7307933291efa64ee4bdace17b5c604a6c07 /components/script/script_thread.rs | |
parent | f6348b8b54a1586b291bd4858df94050e05706c0 (diff) | |
parent | 84f16eae98fee221a1a4754c126d08b2a86a35ff (diff) | |
download | servo-dc22a78cc28a06e4192414974722748a034c93f1.tar.gz servo-dc22a78cc28a06e4192414974722748a034c93f1.zip |
Auto merge of #24757 - Akash-Pateria:async-wasm-compilation-subsequent, r=jdm
Async wasm compilation event loop integration
The PR contains changes related to binding the runnable dispatching in script_runtime and is part of the Asynchronous WebAssembly Compilation fix. This is the first step in the subsequent steps mentioned in the [wiki](https://github.com/servo/servo/wiki/Asynchronous-WebAssembly-compilation-project).
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes are part of #21476 fix
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index c0155ea63a5..81784d73a6c 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1244,7 +1244,12 @@ impl ScriptThread { replace_surrogates: bool, user_agent: Cow<'static, str>, ) -> ScriptThread { - let runtime = new_rt_and_cx(); + let boxed_script_sender = Box::new(MainThreadScriptChan(chan.clone())); + + let runtime = new_rt_and_cx(Some(NetworkingTaskSource( + boxed_script_sender.clone(), + state.id, + ))); let cx = runtime.cx(); unsafe { @@ -1262,8 +1267,6 @@ impl ScriptThread { // Ask the router to proxy IPC messages from the control port to us. let control_port = ROUTER.route_ipc_receiver_to_new_crossbeam_receiver(state.control_port); - let boxed_script_sender = Box::new(MainThreadScriptChan(chan.clone())); - let (image_cache_channel, image_cache_port) = unbounded(); let task_queue = TaskQueue::new(port, chan.clone()); |