Backed out changeset 5fc7462dd394 for android orange.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user