Bug 837418 - Fix silly mistake when dealing with OOM under str_concat, r=terrence.

This commit is contained in:
Brian Hackett 2013-02-03 16:37:56 -07:00
parent 7153c2e7ee
commit 54aa8e3c4c

View File

@ -3074,8 +3074,10 @@ str_concat(JSContext *cx, unsigned argc, Value *vp)
str = strRoot;
}
str = ConcatStrings<NoGC>(cx, str, argStr);
if (!str) {
JSString *next = ConcatStrings<NoGC>(cx, str, argStr);
if (next) {
str = next;
} else {
RootedString strRoot(cx, str), argStrRoot(cx, argStr);
str = ConcatStrings<CanGC>(cx, strRoot, argStrRoot);
if (!str)