Switch to using the new rooted!/RootedGuard API for rooting.

This commit is contained in:
Eduard Burtescu 2016-07-04 20:59:01 +03:00
parent a77cc9950f
commit 0db1faf876
28 changed files with 238 additions and 237 deletions

View file

@ -20,7 +20,6 @@ use dom::eventtarget::EventTarget;
use dom::serviceworkerglobalscope::ServiceWorkerGlobalScope;
use dom::workerglobalscope::prepare_workerscope_init;
use ipc_channel::ipc;
use js::jsapi::RootedValue;
use js::jsval::UndefinedValue;
use script_thread::Runnable;
use std::cell::Cell;
@ -91,7 +90,7 @@ impl ServiceWorker {
}
let global = worker.r().global();
let error = RootedValue::new(global.r().get_cx(), UndefinedValue());
rooted!(in(global.r().get_cx()) let error = UndefinedValue());
let errorevent = ErrorEvent::new(global.r(), atom!("error"),
EventBubbles::Bubbles, EventCancelable::Cancelable,
message, filename, lineno, colno, error.handle());