Merge TM -> JM

This commit is contained in:
Brian Hackett
2011-03-22 18:07:31 -07:00
638 changed files with 14269 additions and 6389 deletions

View File

@@ -229,7 +229,7 @@ EnumerateNativeProperties(JSContext *cx, JSObject *obj, JSObject *pobj, uintN fl
}
}
Reverse(props->begin() + initialLength, props->end());
::Reverse(props->begin() + initialLength, props->end());
return true;
}
@@ -957,10 +957,12 @@ js_IteratorMore(JSContext *cx, JSObject *iterobj, Value *rval)
if (iterobj->getClass() == &js_IteratorClass) {
/* Key iterators are handled by fast-paths. */
ni = iterobj->getNativeIterator();
bool more = ni->props_cursor < ni->props_end;
if (ni->isKeyIter() || !more) {
rval->setBoolean(more);
return true;
if (ni) {
bool more = ni->props_cursor < ni->props_end;
if (ni->isKeyIter() || !more) {
rval->setBoolean(more);
return true;
}
}
}
@@ -1012,7 +1014,7 @@ js_IteratorNext(JSContext *cx, JSObject *iterobj, Value *rval)
* read-only and permanent.
*/
NativeIterator *ni = iterobj->getNativeIterator();
if (ni->isKeyIter()) {
if (ni && ni->isKeyIter()) {
JS_ASSERT(ni->props_cursor < ni->props_end);
*rval = IdToValue(*ni->current());
ni->incCursor();
@@ -1022,8 +1024,8 @@ js_IteratorNext(JSContext *cx, JSObject *iterobj, Value *rval)
JSString *str;
jsint i;
if (rval->isInt32() && (jsuint(i = rval->toInt32()) < INT_STRING_LIMIT)) {
str = JSString::intString(i);
if (rval->isInt32() && JSAtom::hasIntStatic(i = rval->toInt32())) {
str = &JSAtom::intStatic(i);
} else {
str = js_ValueToString(cx, *rval);
if (!str)