Add most handles and stack rooters needed for exact scanning on shell benchmarks, bug 714647. r=billm

This commit is contained in:
Brian Hackett
2012-04-12 09:23:51 -07:00
parent 179e38caf2
commit dc3d6c24fc
81 changed files with 1306 additions and 1025 deletions

View File

@@ -502,7 +502,8 @@ 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);
}
/*
@@ -2664,14 +2665,15 @@ js_InitDateClass(JSContext *cx, JSObject *obj)
/* Set the static LocalTZA. */
LocalTZA = -(PRMJ_LocalGMTDifference() * msPerSecond);
GlobalObject *global = &obj->asGlobal();
RootedVar<GlobalObject*> global(cx, &obj->asGlobal());
JSObject *dateProto = global->createBlankPrototype(cx, &DateClass);
RootedVarObject dateProto(cx, global->createBlankPrototype(cx, &DateClass));
if (!dateProto)
return NULL;
SetDateToNaN(cx, dateProto);
JSFunction *ctor = global->createConstructor(cx, js_Date, CLASS_ATOM(cx, Date), MAXARGS);
RootedVarFunction ctor(cx);
ctor = global->createConstructor(cx, js_Date, CLASS_ATOM(cx, Date), MAXARGS);
if (!ctor)
return NULL;