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

@ -23,7 +23,6 @@ use net_traits::ResourceTask;
use profile_traits::mem;
use script_task::{CommonScriptMsg, ScriptChan, ScriptPort, ScriptTask};
use script_traits::{MsDuration, TimerEventRequest};
use std::sync::mpsc::Sender;
use timers::{ScheduledCallback, TimerHandle};
use url::Url;
use util::mem::HeapSizeOf;
@ -100,7 +99,7 @@ impl<'a> GlobalRef<'a> {
}
/// Get the scheduler channel to request timer events.
pub fn scheduler_chan(&self) -> Sender<TimerEventRequest> {
pub fn scheduler_chan(&self) -> IpcSender<TimerEventRequest> {
match *self {
GlobalRef::Window(window) => window.scheduler_chan(),
GlobalRef::Worker(worker) => worker.scheduler_chan(),

View file

@ -62,7 +62,7 @@ use net_traits::storage_task::StorageType;
use profile_traits::mem::ProfilerChan as MemProfilerChan;
use profile_traits::time::ProfilerChan as TimeProfilerChan;
use script_task::ScriptChan;
use script_traits::{TimerEventChan, TimerEventId, TimerSource, UntrustedNodeAddress};
use script_traits::{TimerEventId, TimerSource, UntrustedNodeAddress};
use selectors::parser::PseudoElement;
use selectors::states::*;
use serde::{Deserialize, Serialize};
@ -302,13 +302,6 @@ impl JSTraceable for Box<ScriptChan + Send> {
}
}
impl JSTraceable for Box<TimerEventChan + Send> {
#[inline]
fn trace(&self, _trc: *mut JSTracer) {
// Do nothing
}
}
impl JSTraceable for Box<FnBox(f64, )> {
#[inline]
fn trace(&self, _trc: *mut JSTracer) {