mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Avoid casting in the callers
get_proto_or_iface_array now returns *mut ProtoOrIfaceArray Fix #6271
This commit is contained in:
parent
458a532461
commit
15c4f7fe2d
2 changed files with 8 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue