servo: Merge #11538 - Fix some build warnings (from Ms2ger:warnings); r=emilio

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because refactoring

Source-Repo: https://github.com/servo/servo
Source-Revision: 0594d58bc8e074facacb26b6d8d3fab2083771d0
This commit is contained in:
Ms2ger 2016-06-01 15:43:58 -05:00
Родитель 316a606753
Коммит 0c88670d97
4 изменённых файлов: 6 добавлений и 12 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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>,

Просмотреть файл

@ -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)

Просмотреть файл

@ -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};