Make RunnableWrapper store an Option<Arc<AtomicBool>>

This makes WorkerGlobalScope::get_runnable_wrapper not panic anymore
when the worker is a ServiceWorkerGlobalScope.
This commit is contained in:
Anthony Ramine 2016-10-04 15:27:13 +02:00
parent 991801488c
commit ca8c6fb072
3 changed files with 7 additions and 5 deletions

View file

@ -868,7 +868,7 @@ impl WindowMethods for Window {
impl Window {
pub fn get_runnable_wrapper(&self) -> RunnableWrapper {
RunnableWrapper {
cancelled: self.ignore_further_async_events.clone()
cancelled: Some(self.ignore_further_async_events.clone()),
}
}