diff options
author | Ms2ger <Ms2ger@gmail.com> | 2016-06-01 10:35:45 +0200 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2016-06-01 10:35:45 +0200 |
commit | 46ea78e9601f1ac0b84ec323c7f26e13c24aca43 (patch) | |
tree | 6fe7ecc64347b964e966f4c761467c836740cd2c | |
parent | 09e6f4ac546a77294d9af7fe0ff0bc344be8de91 (diff) | |
download | servo-46ea78e9601f1ac0b84ec323c7f26e13c24aca43.tar.gz servo-46ea78e9601f1ac0b84ec323c7f26e13c24aca43.zip |
Fix some build warnings.
-rw-r--r-- | components/compositing/compositor.rs | 10 | ||||
-rw-r--r-- | components/script/dom/dedicatedworkerglobalscope.rs | 1 | ||||
-rw-r--r-- | components/script/dom/worker.rs | 6 | ||||
-rw-r--r-- | components/script/script_thread.rs | 1 |
4 files changed, 6 insertions, 12 deletions
diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index d25fdb4b7d2..ada4db87677 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -1932,12 +1932,10 @@ impl<Window: WindowMethods> IOCompositor<Window> { scroll_offset: scroll_layer_state.scroll_offset, }; let pipeline_id = scroll_layer_state.pipeline_id; - match stacking_context_scroll_states_per_pipeline.entry(pipeline_id) { - Vacant(mut entry) => { - entry.insert(vec![stacking_context_scroll_state]); - } - Occupied(mut entry) => entry.get_mut().push(stacking_context_scroll_state), - } + stacking_context_scroll_states_per_pipeline + .entry(pipeline_id) + .or_insert(vec![]) + .push(stacking_context_scroll_state); } for (pipeline_id, stacking_context_scroll_states) in diff --git a/components/script/dom/dedicatedworkerglobalscope.rs b/components/script/dom/dedicatedworkerglobalscope.rs index d658163c233..d7eb6770d09 100644 --- a/components/script/dom/dedicatedworkerglobalscope.rs +++ b/components/script/dom/dedicatedworkerglobalscope.rs @@ -212,7 +212,6 @@ impl DedicatedWorkerGlobalScope { worker_url: Url, id: PipelineId, from_devtools_receiver: IpcReceiver<DevtoolScriptControlMsg>, - parent_rt: SharedRt, worker_rt_for_mainthread: Arc<Mutex<Option<SharedRt>>>, worker: TrustedWorkerAddress, parent_sender: Box<ScriptChan + Send>, diff --git a/components/script/dom/worker.rs b/components/script/dom/worker.rs index 0a18125f1bc..11cf4328aed 100644 --- a/components/script/dom/worker.rs +++ b/components/script/dom/worker.rs @@ -22,7 +22,7 @@ use dom::messageevent::MessageEvent; use dom::workerglobalscope::WorkerGlobalScopeInit; use ipc_channel::ipc; use js::jsapi::{HandleValue, JSContext, JSRuntime, RootedValue}; -use js::jsapi::{JSAutoCompartment, JS_GetRuntime, JS_RequestInterruptCallback}; +use js::jsapi::{JSAutoCompartment, JS_RequestInterruptCallback}; use js::jsval::UndefinedValue; use js::rust::Runtime; use msg::constellation_msg::{PipelineId, ReferrerPolicy}; @@ -146,10 +146,8 @@ impl Worker { closing: closing, }; - let shared_rt = SharedRt { rt: unsafe { JS_GetRuntime(global.get_cx()) } }; - DedicatedWorkerGlobalScope::run_worker_scope( - init, worker_url, global.pipeline(), devtools_receiver, shared_rt, worker.runtime.clone(), worker_ref, + init, worker_url, global.pipeline(), devtools_receiver, worker.runtime.clone(), worker_ref, global.script_chan(), sender, receiver, worker_load_origin); Ok(worker) diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 7f4c8673b65..3671fbbb538 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -88,7 +88,6 @@ use std::borrow::ToOwned; use std::cell::{Cell, RefCell}; use std::collections::HashSet; use std::option::Option; -use std::ptr; use std::rc::Rc; use std::result::Result; use std::sync::atomic::{Ordering, AtomicBool}; |