Pull jsval impl details into jsvalimpl.h (included by jspubtd.h) and pull js::Value into jsvalue.h (engine-private)

This commit is contained in:
Luke Wagner
2010-06-30 15:25:47 -07:00
parent 331c5c8962
commit cff3af7e94
23 changed files with 82 additions and 1528 deletions

View File

@@ -442,7 +442,7 @@ JS_ValueToNumber(JSContext *cx, jsval v, jsdouble *dp)
JS_PUBLIC_API(JSBool)
JS_DoubleIsInt32(jsdouble d, jsint *ip)
{
return JSDOUBLE_IS_INT32(d, *(int32_t *)ip);
return JSDOUBLE_IS_INT32(d, ip);
}
JS_PUBLIC_API(JSBool)
@@ -1148,7 +1148,7 @@ JS_InitStandardClasses(JSContext *cx, JSObject *obj)
/* Define a top-level property 'undefined' with the undefined value. */
atom = cx->runtime->atomState.typeAtoms[JSTYPE_VOID];
if (!obj->defineProperty(cx, ATOM_TO_JSID(atom), undefinedValue(),
if (!obj->defineProperty(cx, ATOM_TO_JSID(atom), UndefinedTag(),
PropertyStub, PropertyStub,
JSPROP_PERMANENT | JSPROP_READONLY)) {
return JS_FALSE;
@@ -1355,7 +1355,7 @@ JS_ResolveStandardClass(JSContext *cx, JSObject *obj, jsid id, JSBool *resolved)
atom = rt->atomState.typeAtoms[JSTYPE_VOID];
if (idstr == ATOM_TO_STRING(atom)) {
*resolved = JS_TRUE;
return obj->defineProperty(cx, ATOM_TO_JSID(atom), undefinedValue(),
return obj->defineProperty(cx, ATOM_TO_JSID(atom), UndefinedTag(),
PropertyStub, PropertyStub,
JSPROP_PERMANENT | JSPROP_READONLY);
}
@@ -1446,7 +1446,7 @@ JS_EnumerateStandardClasses(JSContext *cx, JSObject *obj)
/* Check whether we need to bind 'undefined' and define it if so. */
atom = rt->atomState.typeAtoms[JSTYPE_VOID];
if (!AlreadyHasOwnProperty(cx, obj, atom) &&
!obj->defineProperty(cx, ATOM_TO_JSID(atom), undefinedValue(),
!obj->defineProperty(cx, ATOM_TO_JSID(atom), UndefinedTag(),
PropertyStub, PropertyStub,
JSPROP_PERMANENT | JSPROP_READONLY)) {
return JS_FALSE;