Add cancellability to file manager load and related refactoring

This commit is contained in:
Zhen Zhang 2016-08-01 21:06:58 +02:00
parent 7807895d58
commit 17ae38a318
12 changed files with 137 additions and 189 deletions

View file

@ -19,7 +19,6 @@ use js::jsapi::{CurrentGlobalOrNull, GetGlobalForObjectCrossCompartment};
use js::jsapi::{JSContext, JSObject, JS_GetClass, MutableHandleValue};
use js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL};
use msg::constellation_msg::PipelineId;
use net_traits::filemanager_thread::FileManagerThreadMsg;
use net_traits::{ResourceThreads, CoreResourceThread, IpcSend};
use profile_traits::{mem, time};
use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
@ -133,11 +132,6 @@ impl<'a> GlobalRef<'a> {
self.resource_threads().sender()
}
/// Get the port to file manager for this global scope
pub fn filemanager_thread(&self) -> IpcSender<FileManagerThreadMsg> {
self.resource_threads().sender()
}
/// Get the worker's id.
pub fn get_worker_id(&self) -> Option<WorkerId> {
match *self {