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

@ -155,7 +155,7 @@ impl WorkerGlobalScope {
pub fn get_runnable_wrapper(&self) -> RunnableWrapper {
RunnableWrapper {
cancelled: self.closing.clone().unwrap(),
cancelled: self.closing.clone(),
}
}