mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Reintroduce parent runtimes for worker threads.
This commit is contained in:
parent
644101e1e4
commit
367014a4ea
7 changed files with 49 additions and 14 deletions
|
@ -39,7 +39,7 @@ use ipc_channel::ipc::IpcSender;
|
|||
use js::jsapi::{JSAutoCompartment, JSContext};
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::panic::maybe_resume_unwind;
|
||||
use js::rust::HandleValue;
|
||||
use js::rust::{HandleValue, ParentRuntime};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::request::{CredentialsMode, Destination, RequestInit as NetRequestInit};
|
||||
use net_traits::{load_whole_resource, IpcSend};
|
||||
|
@ -135,6 +135,10 @@ impl WorkerGlobalScope {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn runtime_handle(&self) -> ParentRuntime {
|
||||
self.runtime.prepare_for_new_child()
|
||||
}
|
||||
|
||||
pub fn from_devtools_sender(&self) -> Option<IpcSender<DevtoolScriptControlMsg>> {
|
||||
self.from_devtools_sender.clone()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue