mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Always use JSBool (not bool sometimes, JSBool others) as JSVAL_IS_BOOLEAN's native slot type.
This commit is contained in:
parent
ec6cc824c8
commit
ff93973afe
@ -1121,7 +1121,7 @@ ValueToNative(JSContext* cx, jsval v, uint8 type, double* slot)
|
||||
return false;
|
||||
}
|
||||
*(JSBool*)slot = JSVAL_TO_BOOLEAN(v);
|
||||
debug_only_v(printf("boolean<%d> ", *(bool*)slot);)
|
||||
debug_only_v(printf("boolean<%d> ", *(JSBool*)slot);)
|
||||
return true;
|
||||
case JSVAL_STRING:
|
||||
if (v == JSVAL_VOID) {
|
||||
@ -1210,8 +1210,8 @@ NativeToValue(JSContext* cx, jsval& v, uint8 type, double* slot)
|
||||
jsdouble d;
|
||||
switch (type) {
|
||||
case JSVAL_BOOLEAN:
|
||||
v = BOOLEAN_TO_JSVAL(*(bool*)slot);
|
||||
debug_only_v(printf("boolean<%d> ", *(bool*)slot);)
|
||||
v = BOOLEAN_TO_JSVAL(*(JSBool*)slot);
|
||||
debug_only_v(printf("boolean<%d> ", *(JSBool*)slot);)
|
||||
break;
|
||||
case JSVAL_INT:
|
||||
i = *(jsint*)slot;
|
||||
|
Loading…
Reference in New Issue
Block a user