Merge TM -> JM

This commit is contained in:
Brian Hackett
2011-05-09 09:49:48 -07:00
967 changed files with 15871 additions and 19401 deletions

View File

@@ -246,21 +246,6 @@ js_GetLengthProperty(JSContext *cx, JSObject *obj, jsuint *lengthp)
return ValueToECMAUint32(cx, tvr.value(), (uint32_t *)lengthp);
}
JSBool JS_FASTCALL
js_IndexToId(JSContext *cx, jsuint index, jsid *idp)
{
JSString *str;
if (index <= JSID_INT_MAX) {
*idp = INT_TO_JSID(index);
return JS_TRUE;
}
str = js_NumberToString(cx, index);
if (!str)
return JS_FALSE;
return js_ValueToStringId(cx, StringValue(str), idp);
}
static JSBool
BigIndexToId(JSContext *cx, JSObject *obj, jsuint index, JSBool createAtom,
jsid *idp)
@@ -1089,7 +1074,7 @@ JSObject::makeDenseArraySlow(JSContext *cx)
js::Shape *oldMap = lastProp;
/* Create a native scope. */
js::gc::FinalizeKind kind = js::gc::FinalizeKind(arena()->header()->thingKind);
js::gc::FinalizeKind kind = js::gc::FinalizeKind(arenaHeader()->getThingKind());
if (!InitScopeForObject(cx, this, &js_SlowArrayClass, getType(), kind))
return false;
@@ -2244,7 +2229,7 @@ ArrayCompPushImpl(JSContext *cx, JSObject *obj, const Value &v)
if (obj->isSlowArray()) {
/* This can happen in one evil case. See bug 630377. */
jsid id;
return js_IndexToId(cx, length, &id) &&
return IndexToId(cx, length, &id) &&
js_DefineProperty(cx, obj, id, &v, NULL, NULL, JSPROP_ENUMERATE);
}