diff options
author | Joshua Holmer <holmerj@uindy.edu> | 2016-01-14 12:01:11 -0500 |
---|---|---|
committer | Joshua Holmer <holmerj@uindy.edu> | 2016-01-14 12:01:11 -0500 |
commit | 4d7f304ef78d701d253642f409c24683a3296048 (patch) | |
tree | 0351b76587203a22b6c428d95e6334e0340a121e /components/script/script_thread.rs | |
parent | a28b5cb43859b6300c0b157c6b3d25d78606dda8 (diff) | |
download | servo-4d7f304ef78d701d253642f409c24683a3296048.tar.gz servo-4d7f304ef78d701d253642f409c24683a3296048.zip |
Rename SCRIPT_TASK_ROOT to SCRIPT_THREAD_ROOT
Resolves #9316
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 1b42f35d716..96b5fb99349 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -109,10 +109,10 @@ use util::thread_state; use webdriver_handlers; thread_local!(pub static STACK_ROOTS: Cell<Option<RootCollectionPtr>> = Cell::new(None)); -thread_local!(static SCRIPT_TASK_ROOT: RefCell<Option<*const ScriptThread>> = RefCell::new(None)); +thread_local!(static SCRIPT_THREAD_ROOT: RefCell<Option<*const ScriptThread>> = RefCell::new(None)); unsafe extern fn trace_rust_roots(tr: *mut JSTracer, _data: *mut libc::c_void) { - SCRIPT_TASK_ROOT.with(|root| { + SCRIPT_THREAD_ROOT.with(|root| { if let Some(script_thread) = *root.borrow() { (*script_thread).trace(tr); } @@ -627,7 +627,7 @@ impl ScriptThreadFactory for ScriptThread { script_port, script_chan); - SCRIPT_TASK_ROOT.with(|root| { + SCRIPT_THREAD_ROOT.with(|root| { *root.borrow_mut() = Some(&script_thread as *const _); }); @@ -708,21 +708,21 @@ pub unsafe extern "C" fn shadow_check_callback(_cx: *mut JSContext, impl ScriptThread { pub fn page_fetch_complete(id: PipelineId, subpage: Option<SubpageId>, metadata: Metadata) -> Option<ParserRoot> { - SCRIPT_TASK_ROOT.with(|root| { + SCRIPT_THREAD_ROOT.with(|root| { let script_thread = unsafe { &*root.borrow().unwrap() }; script_thread.handle_page_fetch_complete(id, subpage, metadata) }) } pub fn parsing_complete(id: PipelineId) { - SCRIPT_TASK_ROOT.with(|root| { + SCRIPT_THREAD_ROOT.with(|root| { let script_thread = unsafe { &*root.borrow().unwrap() }; script_thread.handle_parsing_complete(id); }); } pub fn process_event(msg: CommonScriptMsg) { - SCRIPT_TASK_ROOT.with(|root| { + SCRIPT_THREAD_ROOT.with(|root| { if let Some(script_thread) = *root.borrow() { let script_thread = unsafe { &*script_thread }; script_thread.handle_msg_from_script(MainThreadScriptMsg::Common(msg)); @@ -2205,7 +2205,7 @@ impl ScriptThread { impl Drop for ScriptThread { fn drop(&mut self) { - SCRIPT_TASK_ROOT.with(|root| { + SCRIPT_THREAD_ROOT.with(|root| { *root.borrow_mut() = None; }); } |