mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1181354 - Account for initaliasedlexical in this one weird const cutout in jit::SetProperty. (r=jandem)
This commit is contained in:
parent
7b509de733
commit
70b1b66aff
9
js/src/jit-test/tests/ion/bug1181354.js
Normal file
9
js/src/jit-test/tests/ion/bug1181354.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
for (a of []) {}
|
||||||
|
var log = "";
|
||||||
|
(function() {
|
||||||
|
for (a of [,0]) {}
|
||||||
|
const y = "FOO";
|
||||||
|
log += y;
|
||||||
|
function inner() { log += y; }
|
||||||
|
})()
|
||||||
|
assertEq(log, "FOO");
|
@ -414,7 +414,7 @@ SetProperty(JSContext* cx, HandleObject obj, HandlePropertyName name, HandleValu
|
|||||||
|
|
||||||
JSOp op = JSOp(*pc);
|
JSOp op = JSOp(*pc);
|
||||||
|
|
||||||
if (op == JSOP_SETALIASEDVAR) {
|
if (op == JSOP_SETALIASEDVAR || op == JSOP_INITALIASEDLEXICAL) {
|
||||||
// Aliased var assigns ignore readonly attributes on the property, as
|
// Aliased var assigns ignore readonly attributes on the property, as
|
||||||
// required for initializing 'const' closure variables.
|
// required for initializing 'const' closure variables.
|
||||||
Shape* shape = obj->as<NativeObject>().lookup(cx, name);
|
Shape* shape = obj->as<NativeObject>().lookup(cx, name);
|
||||||
|
Loading…
Reference in New Issue
Block a user