Auto merge of #8492 - jdm:e10s-timer-events, r=jdm

script: Make timer events e10s-safe.

Closes #8235.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8492)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-11-13 05:19:48 +05:30
commit 9eaa8e7b1f
12 changed files with 64 additions and 97 deletions

View file

@ -53,8 +53,8 @@ use page::Page;
use profile_traits::mem;
use rustc_serialize::base64::{FromBase64, STANDARD, ToBase64};
use script_task::{ScriptChan, ScriptPort, MainThreadScriptMsg, RunnableWrapper};
use script_task::{SendableMainThreadScriptChan, MainThreadScriptChan, MainThreadTimerEventChan};
use script_traits::{MsDuration, TimerEventChan, TimerEventId, TimerEventRequest, TimerSource};
use script_task::{SendableMainThreadScriptChan, MainThreadScriptChan};
use script_traits::{MsDuration, TimerEvent, TimerEventId, TimerEventRequest, TimerSource};
use selectors::parser::PseudoElement;
use std::ascii::AsciiExt;
use std::borrow::ToOwned;
@ -129,7 +129,7 @@ pub struct Window {
session_storage: MutNullableHeap<JS<Storage>>,
local_storage: MutNullableHeap<JS<Storage>>,
#[ignore_heap_size_of = "channels are hard"]
scheduler_chan: Sender<TimerEventRequest>,
scheduler_chan: IpcSender<TimerEventRequest>,
timers: ActiveTimers,
next_worker_id: Cell<WorkerId>,
@ -1075,7 +1075,7 @@ impl Window {
self.constellation_chan.clone()
}
pub fn scheduler_chan(&self) -> Sender<TimerEventRequest> {
pub fn scheduler_chan(&self) -> IpcSender<TimerEventRequest> {
self.scheduler_chan.clone()
}
@ -1225,8 +1225,8 @@ impl Window {
mem_profiler_chan: mem::ProfilerChan,
devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
constellation_chan: ConstellationChan,
scheduler_chan: Sender<TimerEventRequest>,
timer_event_chan: MainThreadTimerEventChan,
scheduler_chan: IpcSender<TimerEventRequest>,
timer_event_chan: IpcSender<TimerEvent>,
layout_chan: LayoutChan,
id: PipelineId,
parent_info: Option<(PipelineId, SubpageId)>,
@ -1259,7 +1259,7 @@ impl Window {
session_storage: Default::default(),
local_storage: Default::default(),
scheduler_chan: scheduler_chan.clone(),
timers: ActiveTimers::new(box timer_event_chan, scheduler_chan),
timers: ActiveTimers::new(timer_event_chan, scheduler_chan),
next_worker_id: Cell::new(WorkerId(0)),
id: id,
parent_info: parent_info,