Introduce GlobalScope::pipeline_id

This commit is contained in:
Anthony Ramine 2016-10-01 17:24:54 +02:00
parent c6ff767625
commit 27f100b1d4
21 changed files with 103 additions and 85 deletions

View file

@ -23,7 +23,6 @@ use js::jsapi::{HandleValue, JS_GetClass, JSAutoCompartment, JSContext};
use js::jsapi::{JSObject, MutableHandleValue};
use js::rust::CompileOptionsWrapper;
use libc;
use msg::constellation_msg::PipelineId;
use net_traits::{CoreResourceThread, IpcSend, ResourceThreads};
use profile_traits::time;
use script_runtime::{CommonScriptMsg, EnqueuedPromiseCallback, ScriptChan};
@ -80,14 +79,6 @@ impl<'a> GlobalRef<'a> {
}
}
/// Get the `PipelineId` for this global scope.
pub fn pipeline_id(&self) -> PipelineId {
match *self {
GlobalRef::Window(window) => window.pipeline_id(),
GlobalRef::Worker(worker) => worker.pipeline_id(),
}
}
/// Get the `ResourceThreads` for this global scope.
pub fn resource_threads(&self) -> ResourceThreads {
match *self {