Bug 675806 - Make static strings be GC things (r=luke)

This commit is contained in:
Bill McCloskey
2011-09-20 14:47:14 -07:00
parent 1080105138
commit 6316f0c54c
23 changed files with 283 additions and 643 deletions

View File

@@ -1025,8 +1025,8 @@ js_IteratorNext(JSContext *cx, JSObject *iterobj, Value *rval)
JSString *str;
jsint i;
if (rval->isInt32() && JSAtom::hasIntStatic(i = rval->toInt32())) {
str = &JSAtom::intStatic(i);
if (rval->isInt32() && StaticStrings::hasInt(i = rval->toInt32())) {
str = cx->runtime->staticStrings.getInt(i);
} else {
str = js_ValueToString(cx, *rval);
if (!str)