diff options
author | Marcin Mielniczuk <marmistrz.dev@zoho.eu> | 2018-03-28 21:28:30 +0200 |
---|---|---|
committer | Marcin Mielniczuk <marmistrz.dev@zoho.eu> | 2018-03-28 21:28:30 +0200 |
commit | 356c57e628255ed338b32246ce5e7de75da621f0 (patch) | |
tree | e6b98e284bf4cabce6c0dfce8b593dc9c2f8a534 /components/script/timers.rs | |
parent | e04d517bff695c03df7f0417a494c8286860bc3c (diff) | |
download | servo-356c57e628255ed338b32246ce5e7de75da621f0.tar.gz servo-356c57e628255ed338b32246ce5e7de75da621f0.zip |
Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393
Diffstat (limited to 'components/script/timers.rs')
-rw-r--r-- | components/script/timers.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/timers.rs b/components/script/timers.rs index a5e7020095f..50f95d8400a 100644 --- a/components/script/timers.rs +++ b/components/script/timers.rs @@ -14,8 +14,9 @@ use dom::testbinding::TestBindingCallback; use dom::xmlhttprequest::XHRTimeoutCallback; use euclid::Length; use ipc_channel::ipc::IpcSender; -use js::jsapi::{HandleValue, Heap}; +use js::jsapi::Heap; use js::jsval::{JSVal, UndefinedValue}; +use js::rust::HandleValue; use script_traits::{MsDuration, precise_time_ms}; use script_traits::{TimerEvent, TimerEventId, TimerEventRequest}; use script_traits::{TimerSchedulerMsg, TimerSource}; @@ -520,7 +521,7 @@ impl JsTimerTask { // Returning Handles directly from Heap values is inherently unsafe, but here it's // always done via rooted JsTimers, which is safe. #[allow(unsafe_code)] - fn collect_heap_args(&self, args: &[Heap<JSVal>]) -> Vec<HandleValue> { + fn collect_heap_args<'b>(&self, args: &'b [Heap<JSVal>]) -> Vec<HandleValue<'b>> { args.iter().map(|arg| unsafe { arg.handle() }).collect() } } |