mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Introduce GlobalScope::core_resource_thread
This commit is contained in:
parent
de846f25a6
commit
71236e168a
5 changed files with 12 additions and 14 deletions
|
@ -21,7 +21,7 @@ use dom::workerglobalscope::WorkerGlobalScope;
|
|||
use ipc_channel::ipc::IpcSender;
|
||||
use js::jsapi::{HandleValue, JS_GetContext, JS_GetObjectRuntime, JSContext};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::ResourceThreads;
|
||||
use net_traits::{CoreResourceThread, ResourceThreads, IpcSend};
|
||||
use profile_traits::{mem, time};
|
||||
use script_traits::{ScriptMsg as ConstellationMsg, TimerEventRequest};
|
||||
use std::cell::Cell;
|
||||
|
@ -252,6 +252,11 @@ impl GlobalScope {
|
|||
pub fn resource_threads(&self) -> &ResourceThreads {
|
||||
&self.resource_threads
|
||||
}
|
||||
|
||||
/// Get the `CoreResourceThread` for this global scope.
|
||||
pub fn core_resource_thread(&self) -> CoreResourceThread {
|
||||
self.resource_threads().sender()
|
||||
}
|
||||
}
|
||||
|
||||
fn timestamp_in_ms(time: Timespec) -> u64 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue