mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 866611 - Fix length check when inlining string concatenation. r=h4writer
This commit is contained in:
parent
432f850d5a
commit
6cb2d2291b
@ -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);
|
||||
|
5
js/src/jit-test/tests/ion/bug866611.js
Normal file
5
js/src/jit-test/tests/ion/bug866611.js
Normal file
@ -0,0 +1,5 @@
|
||||
// |jit-test| error: InternalError
|
||||
y = 'x'
|
||||
for (var i=0; i<100; i++)
|
||||
y += y;
|
||||
print(y.length);
|
Loading…
Reference in New Issue
Block a user