Use snake case for the local in initialize_global.

This commit is contained in:
Ms2ger 2015-01-29 19:01:10 +01:00
parent 04f5dea19f
commit 1af1302010

View file

@ -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.
/// Fails if the argument is not a DOM global.
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 {
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,
DOM_PROTOTYPE_SLOT,
PrivateValue(box_ as *const libc::c_void));