Merge TM -> JM
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user