mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Use snake case for the local in initialize_global.
This commit is contained in:
parent
04f5dea19f
commit
1af1302010
1 changed files with 3 additions and 2 deletions
|
@ -339,10 +339,11 @@ pub unsafe extern fn throwing_constructor(cx: *mut JSContext, _argc: c_uint,
|
||||||
/// Construct and cache the ProtoOrIfaceArray for the given global.
|
/// Construct and cache the ProtoOrIfaceArray for the given global.
|
||||||
/// Fails if the argument is not a DOM global.
|
/// Fails if the argument is not a DOM global.
|
||||||
pub fn initialize_global(global: *mut JSObject) {
|
pub fn initialize_global(global: *mut JSObject) {
|
||||||
let protoArray = box () ([0 as *mut JSObject; PrototypeList::ID::Count as uint]);
|
let proto_array = box ()
|
||||||
|
([0 as *mut JSObject; PrototypeList::ID::Count as uint]);
|
||||||
unsafe {
|
unsafe {
|
||||||
assert!(((*JS_GetClass(global)).flags & JSCLASS_DOM_GLOBAL) != 0);
|
assert!(((*JS_GetClass(global)).flags & JSCLASS_DOM_GLOBAL) != 0);
|
||||||
let box_ = squirrel_away_unique(protoArray);
|
let box_ = squirrel_away_unique(proto_array);
|
||||||
JS_SetReservedSlot(global,
|
JS_SetReservedSlot(global,
|
||||||
DOM_PROTOTYPE_SLOT,
|
DOM_PROTOTYPE_SLOT,
|
||||||
PrivateValue(box_ as *const libc::c_void));
|
PrivateValue(box_ as *const libc::c_void));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue