diff options
-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 89eb0bf29bc..f00cb496eb1 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 3b40313434a..3dae1d3cff4 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 7c5eab3b045..11802a8e0b2 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 f0bf7a6e4ba..8e358156e88 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}; |