mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Use snake case for arguments to and locals in create_interface_object.
This commit is contained in:
parent
47cd2d7eb4
commit
b336b024f7
1 changed files with 6 additions and 6 deletions
|
@ -217,12 +217,12 @@ pub fn do_create_interface_objects(cx: *mut JSContext, global: *mut JSObject,
|
||||||
/// Fails on JSAPI failure.
|
/// Fails on JSAPI failure.
|
||||||
fn create_interface_object(cx: *mut JSContext, global: *mut JSObject,
|
fn create_interface_object(cx: *mut JSContext, global: *mut JSObject,
|
||||||
receiver: *mut JSObject,
|
receiver: *mut JSObject,
|
||||||
constructorNative: NonNullJSNative,
|
constructor_native: NonNullJSNative,
|
||||||
ctorNargs: u32, proto: *mut JSObject,
|
ctor_nargs: u32, proto: *mut JSObject,
|
||||||
members: &'static NativeProperties,
|
members: &'static NativeProperties,
|
||||||
name: *const libc::c_char) {
|
name: *const libc::c_char) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let fun = JS_NewFunction(cx, Some(constructorNative), ctorNargs,
|
let fun = JS_NewFunction(cx, Some(constructor_native), ctor_nargs,
|
||||||
JSFUN_CONSTRUCTOR, global, name);
|
JSFUN_CONSTRUCTOR, global, name);
|
||||||
assert!(!fun.is_null());
|
assert!(!fun.is_null());
|
||||||
|
|
||||||
|
@ -252,10 +252,10 @@ fn create_interface_object(cx: *mut JSContext, global: *mut JSObject,
|
||||||
assert!(JS_LinkConstructorAndPrototype(cx, constructor, proto) != 0);
|
assert!(JS_LinkConstructorAndPrototype(cx, constructor, proto) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut alreadyDefined = 0;
|
let mut already_defined = 0;
|
||||||
assert!(JS_AlreadyHasOwnProperty(cx, receiver, name, &mut alreadyDefined) != 0);
|
assert!(JS_AlreadyHasOwnProperty(cx, receiver, name, &mut already_defined) != 0);
|
||||||
|
|
||||||
if alreadyDefined == 0 {
|
if already_defined == 0 {
|
||||||
assert!(JS_DefineProperty(cx, receiver, name,
|
assert!(JS_DefineProperty(cx, receiver, name,
|
||||||
ObjectValue(&*constructor),
|
ObjectValue(&*constructor),
|
||||||
None, None, 0) != 0);
|
None, None, 0) != 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue