mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make create_global_object take a &'static Class
This commit is contained in:
parent
a4f2159e36
commit
5f59bb2e0c
2 changed files with 2 additions and 2 deletions
|
@ -2516,7 +2516,7 @@ let _rt = RootedTraceable::new(&*raw);
|
||||||
rooted!(in(cx) let obj =
|
rooted!(in(cx) let obj =
|
||||||
create_global_object(
|
create_global_object(
|
||||||
cx,
|
cx,
|
||||||
&Class.base as *const js::jsapi::Class as *const _,
|
&*(&Class.base as *const js::jsapi::Class as *const _),
|
||||||
raw as *const libc::c_void,
|
raw as *const libc::c_void,
|
||||||
_trace));
|
_trace));
|
||||||
assert!(!obj.is_null());
|
assert!(!obj.is_null());
|
||||||
|
|
|
@ -216,7 +216,7 @@ pub type TraceHook =
|
||||||
/// Create a global object with the given class.
|
/// Create a global object with the given class.
|
||||||
pub unsafe fn create_global_object(
|
pub unsafe fn create_global_object(
|
||||||
cx: *mut JSContext,
|
cx: *mut JSContext,
|
||||||
class: *const JSClass,
|
class: &'static JSClass,
|
||||||
private: *const libc::c_void,
|
private: *const libc::c_void,
|
||||||
trace: TraceHook)
|
trace: TraceHook)
|
||||||
-> *mut JSObject {
|
-> *mut JSObject {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue