Bug 866611 - Fix length check when inlining string concatenation. r=h4writer

This commit is contained in:
Jan de Mooij 2013-04-29 19:22:50 +02:00
parent 432f850d5a
commit 6cb2d2291b
2 changed files with 6 additions and 1 deletions

View File

@ -3670,7 +3670,7 @@ IonCompartment::generateStringConcatStub(JSContext *cx)
&isShort);
// Ensure result length <= JSString::MAX_LENGTH.
masm.branch32(Assembler::Above, temp1, Imm32(JSString::MAX_LENGTH), &failure);
masm.branch32(Assembler::Above, temp2, Imm32(JSString::MAX_LENGTH), &failure);
// Allocate a new rope.
masm.newGCString(output, &failure);

View File

@ -0,0 +1,5 @@
// |jit-test| error: InternalError
y = 'x'
for (var i=0; i<100; i++)
y += y;
print(y.length);