Backed out changeset 5fc7462dd394 for android orange.

This commit is contained in:
Brian Hackett
2012-05-19 11:52:55 -07:00
parent b7d2500332
commit 4f8baecc9e
102 changed files with 1628 additions and 1653 deletions

View File

@@ -499,12 +499,13 @@ msFromTime(double t)
*/
static JSBool
date_convert(JSContext *cx, HandleObject obj, JSType hint, Value *vp)
date_convert(JSContext *cx, JSObject *obj, JSType hint, Value *vp)
{
JS_ASSERT(hint == JSTYPE_NUMBER || hint == JSTYPE_STRING || hint == JSTYPE_VOID);
JS_ASSERT(obj->isDate());
return DefaultValue(cx, obj, (hint == JSTYPE_VOID) ? JSTYPE_STRING : hint, vp);
return DefaultValue(cx, RootedVarObject(cx, obj),
(hint == JSTYPE_VOID) ? JSTYPE_STRING : hint, vp);
}
/*
@@ -2692,11 +2693,11 @@ js_InitDateClass(JSContext *cx, JSObject *obj)
if (!JS_DefineFunctions(cx, dateProto, date_methods))
return NULL;
Value toUTCStringFun;
RootedVarId toUTCStringId(cx, NameToId(cx->runtime->atomState.toUTCStringAtom));
RootedVarId toGMTStringId(cx, NameToId(cx->runtime->atomState.toGMTStringAtom));
if (!baseops::GetProperty(cx, dateProto, toUTCStringId, &toUTCStringFun) ||
!baseops::DefineProperty(cx, dateProto, toGMTStringId, &toUTCStringFun,
JS_PropertyStub, JS_StrictPropertyStub, 0))
jsid toUTCStringId = NameToId(cx->runtime->atomState.toUTCStringAtom);
jsid toGMTStringId = NameToId(cx->runtime->atomState.toGMTStringAtom);
if (!js_GetProperty(cx, dateProto, toUTCStringId, &toUTCStringFun) ||
!js_DefineProperty(cx, dateProto, toGMTStringId, &toUTCStringFun,
JS_PropertyStub, JS_StrictPropertyStub, 0))
{
return NULL;
}