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 IOCompositor { 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, - parent_rt: SharedRt, worker_rt_for_mainthread: Arc>>, worker: TrustedWorkerAddress, parent_sender: Box, 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};