mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Make GetProtoOrIfaceArray return the actual type.
This commit is contained in:
parent
1834855ff5
commit
51d2891c9b
2 changed files with 3 additions and 3 deletions
|
@ -1966,7 +1966,7 @@ class CGGetPerInterfaceObject(CGAbstractMethod):
|
||||||
assert!(((*JS_GetClass(aGlobal)).flags & JSCLASS_DOM_GLOBAL) != 0);
|
assert!(((*JS_GetClass(aGlobal)).flags & JSCLASS_DOM_GLOBAL) != 0);
|
||||||
|
|
||||||
/* Check to see whether the interface objects are already installed */
|
/* Check to see whether the interface objects are already installed */
|
||||||
let protoOrIfaceArray: *mut *mut JSObject = GetProtoOrIfaceArray(aGlobal) as *mut *mut JSObject;
|
let protoOrIfaceArray = GetProtoOrIfaceArray(aGlobal);
|
||||||
let cachedObject: *mut JSObject = *protoOrIfaceArray.offset(%s as int);
|
let cachedObject: *mut JSObject = *protoOrIfaceArray.offset(%s as int);
|
||||||
if cachedObject.is_null() {
|
if cachedObject.is_null() {
|
||||||
let tmp: *mut JSObject = CreateInterfaceObjects(aCx, aGlobal, aReceiver);
|
let tmp: *mut JSObject = CreateInterfaceObjects(aCx, aGlobal, aReceiver);
|
||||||
|
|
|
@ -206,10 +206,10 @@ pub struct DOMJSClass {
|
||||||
pub dom_class: DOMClass
|
pub dom_class: DOMClass
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn GetProtoOrIfaceArray(global: *mut JSObject) -> **mut JSObject {
|
pub fn GetProtoOrIfaceArray(global: *mut JSObject) -> *mut *mut JSObject {
|
||||||
unsafe {
|
unsafe {
|
||||||
assert!(((*JS_GetClass(global)).flags & JSCLASS_DOM_GLOBAL) != 0);
|
assert!(((*JS_GetClass(global)).flags & JSCLASS_DOM_GLOBAL) != 0);
|
||||||
JS_GetReservedSlot(global, DOM_PROTOTYPE_SLOT).to_private() as **mut JSObject
|
JS_GetReservedSlot(global, DOM_PROTOTYPE_SLOT).to_private() as *mut *mut JSObject
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue