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
This commit is contained in:
bors-servo 2019-11-20 16:16:13 -05:00 committed by GitHub
commit dc22a78cc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
68 changed files with 162 additions and 427 deletions

View file

@ -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());