mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
move reserved slot setting for DOM globals
Moving this slot setting prior to initializing standard classes and other initialization tasks means that we can effectively use JS_GC_ZEAL. Fixes #6057.
This commit is contained in:
parent
3d39646c8e
commit
c82b6ce843
2 changed files with 5 additions and 5 deletions
|
@ -2163,12 +2163,10 @@ let obj = RootedObject::new(cx, obj);\
|
|||
" create_dom_global(\n"
|
||||
" cx,\n"
|
||||
" &Class.base as *const js::jsapi::Class as *const JSClass,\n"
|
||||
" raw as *const libc::c_void,\n"
|
||||
" Some(%s))\n"
|
||||
");\n"
|
||||
"assert!(!obj.ptr.is_null());\n"
|
||||
"\n"
|
||||
"JS_SetReservedSlot(obj.ptr, DOM_OBJECT_SLOT,\n"
|
||||
" PrivateValue(raw as *const libc::c_void));" % TRACE_HOOK_NAME)
|
||||
"assert!(!obj.ptr.is_null());" % TRACE_HOOK_NAME)
|
||||
else:
|
||||
create += ("let obj = {\n"
|
||||
" let _ac = JSAutoCompartment::new(cx, proto.ptr);\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue