introduce a pipeline namespace installer

This commit is contained in:
Gregory Terzian 2019-08-13 14:31:10 +02:00
parent 47aa1ccaa2
commit 34008a317b
7 changed files with 140 additions and 7 deletions

View file

@ -44,7 +44,7 @@ use js::jsapi::JSAutoRealm;
use js::jsval::UndefinedValue;
use js::panic::maybe_resume_unwind;
use js::rust::{HandleValue, ParentRuntime};
use msg::constellation_msg::PipelineId;
use msg::constellation_msg::{PipelineId, PipelineNamespace};
use net_traits::request::{
CredentialsMode, Destination, ParserMetadata, RequestBuilder as NetRequestInit,
};
@ -123,6 +123,8 @@ impl WorkerGlobalScope {
timer_event_chan: IpcSender<TimerEvent>,
closing: Option<Arc<AtomicBool>>,
) -> Self {
// Install a pipeline-namespace in the current thread.
PipelineNamespace::auto_install();
Self {
globalscope: GlobalScope::new_inherited(
init.pipeline_id,