Updated to mozjs v0.7.1.

This commit is contained in:
Alan Jeffrey 2018-05-30 14:44:47 -05:00
parent 0786e34a3a
commit d0cc9d2cd5
13 changed files with 39 additions and 30 deletions

View file

@ -32,7 +32,7 @@ use js::glue::UnwrapObject;
use js::jsapi::{Heap, IsCallable, IsConstructor, HandleValueArray};
use js::jsapi::{JSAutoCompartment, JSContext, JSObject};
use js::jsval::{JSVal, NullValue, ObjectValue, UndefinedValue};
use js::rust::{HandleObject, MutableHandleValue};
use js::rust::{HandleObject, HandleValue, MutableHandleValue};
use js::rust::wrappers::{JS_GetProperty, Construct1, JS_SameValue};
use microtask::Microtask;
use script_thread::ScriptThread;
@ -612,7 +612,7 @@ impl CustomElementReaction {
CustomElementReaction::Upgrade(ref definition) => upgrade_element(definition.clone(), element),
CustomElementReaction::Callback(ref callback, ref arguments) => {
// We're rooted, so it's safe to hand out a handle to objects in Heap
let arguments = arguments.iter().map(|arg| unsafe { arg.handle() }).collect();
let arguments = arguments.iter().map(|arg| unsafe { HandleValue::from_raw(arg.handle()) }).collect();
let _ = callback.Call_(&*element, arguments, ExceptionHandling::Report);
}
}