mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Auto merge of #6299 - GreenRecycleBin:#6271, r=Ms2ger
get_proto_or_iface_array now returns *mut ProtoOrIfaceArray Fix #6271 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6299) <!-- Reviewable:end -->
This commit is contained in:
commit
ca6a34a1cd
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