mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
implement NonCallbackInterfaceObjectClass::as_jsclass()
This commit is contained in:
parent
0b5dda3e9c
commit
e2160cb3b9
1 changed files with 8 additions and 1 deletions
|
@ -105,6 +105,13 @@ impl NonCallbackInterfaceObjectClass {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// cast own reference to `JSClass` reference
|
||||||
|
pub fn as_jsclass(&self) -> &JSClass {
|
||||||
|
unsafe {
|
||||||
|
&*(self as *const _ as *const JSClass)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create and define the interface object of a callback interface.
|
/// Create and define the interface object of a callback interface.
|
||||||
|
@ -148,7 +155,7 @@ pub unsafe fn create_noncallback_interface_object(
|
||||||
rval: MutableHandleObject) {
|
rval: MutableHandleObject) {
|
||||||
create_object(cx,
|
create_object(cx,
|
||||||
proto,
|
proto,
|
||||||
&*(class as *const _ as *const JSClass),
|
class.as_jsclass(),
|
||||||
static_methods,
|
static_methods,
|
||||||
static_properties,
|
static_properties,
|
||||||
constants,
|
constants,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue