mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1138740 - Notify Ion when changing a typed array's data pointer due to making a lazy buffer for it, r=sfink.
This commit is contained in:
parent
6eeafa355c
commit
fd71c78938
12
js/src/jit-test/tests/ion/bug1138740.js
Normal file
12
js/src/jit-test/tests/ion/bug1138740.js
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
with({}){}
|
||||
x = Int8Array(1)
|
||||
function f(y) {
|
||||
x[0] = y
|
||||
}
|
||||
f()
|
||||
f(3)
|
||||
f(7)
|
||||
x.buffer;
|
||||
f(0);
|
||||
assertEq(x[0], 0);
|
@ -120,6 +120,10 @@ TypedArrayObject::ensureHasBuffer(JSContext *cx, Handle<TypedArrayObject *> tarr
|
||||
tarray->setPrivate(buffer->dataPointer());
|
||||
|
||||
tarray->setSlot(TypedArrayLayout::BUFFER_SLOT, ObjectValue(*buffer));
|
||||
|
||||
// Notify compiled jit code that the base pointer has moved.
|
||||
MarkObjectStateChange(cx, tarray);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user