Avoid casting in the callers

get_proto_or_iface_array now returns *mut ProtoOrIfaceArray

Fix #6271
This commit is contained in:
Daniel Le 2015-06-06 11:45:40 +08:00
parent 458a532461
commit 15c4f7fe2d
2 changed files with 8 additions and 7 deletions

View file

@ -2165,11 +2165,11 @@ assert!(((*JS_GetClass(global)).flags & JSCLASS_DOM_GLOBAL) != 0);
/* Check to see whether the interface objects are already installed */
let proto_or_iface_array = get_proto_or_iface_array(global);
let cached_object: *mut JSObject = *proto_or_iface_array.offset(%s as isize);
let cached_object: *mut JSObject = (*proto_or_iface_array)[%s as usize];
if cached_object.is_null() {
let tmp: *mut JSObject = CreateInterfaceObjects(cx, global, receiver);
assert!(!tmp.is_null());
*proto_or_iface_array.offset(%s as isize) = tmp;
(*proto_or_iface_array)[%s as usize] = tmp;
tmp
} else {
cached_object