Upgraded to SM 60

This commit is contained in:
Alan Jeffrey 2018-06-01 17:24:25 -05:00 committed by Josh Matthews
parent d34403047e
commit 74c1e00d81
290 changed files with 26572 additions and 1178 deletions

View file

@ -45,12 +45,13 @@ pub use js::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvert
pub use js::conversions::ConversionBehavior;
use js::conversions::latin1_to_string;
use js::error::throw_type_error;
use js::glue::{GetProxyPrivate, IsWrapper};
use js::glue::{IsWrapper, UnwrapObject};
use js::glue::{RUST_JSID_IS_INT, RUST_JSID_TO_INT};
use js::glue::{UnwrapObject, RUST_JSID_IS_STRING, RUST_JSID_TO_STRING};
use js::glue::{RUST_JSID_IS_STRING, RUST_JSID_TO_STRING};
use js::glue::GetProxyReservedSlot;
use js::glue::JS_GetReservedSlot;
use js::jsapi::{Heap, JSContext, JSObject, JSString};
use js::jsapi::{JS_GetLatin1StringCharsAndLength, JS_GetReservedSlot};
use js::jsapi::{JS_GetTwoByteStringCharsAndLength, JS_IsExceptionPending};
use js::jsapi::{JS_GetLatin1StringCharsAndLength, JS_GetTwoByteStringCharsAndLength, JS_IsExceptionPending};
use js::jsapi::{JS_NewStringCopyN, JS_StringHasLatin1Chars};
use js::jsval::{ObjectValue, StringValue, UndefinedValue};
use js::rust::{HandleId, HandleObject, HandleValue, MutableHandleValue};
@ -347,11 +348,12 @@ pub const DOM_OBJECT_SLOT: u32 = 0;
/// Get the private pointer of a DOM object from a given reflector.
pub unsafe fn private_from_object(obj: *mut JSObject) -> *const libc::c_void {
let value = if is_dom_object(obj) {
JS_GetReservedSlot(obj, DOM_OBJECT_SLOT)
let mut value = UndefinedValue();
if is_dom_object(obj) {
JS_GetReservedSlot(obj, DOM_OBJECT_SLOT, &mut value);
} else {
debug_assert!(is_dom_proxy(obj));
GetProxyPrivate(obj)
GetProxyReservedSlot(obj, 0, &mut value);
};
if value.is_undefined() {
ptr::null()