mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 779631 - Don't inline calls to setters on watched singleton objects. (r=dvander)
This commit is contained in:
parent
8cca0afc1c
commit
ec43218a83
@ -5236,6 +5236,10 @@ IonBuilder::TestCommonPropFunc(JSContext *cx, types::TypeSet *types, HandleId id
|
||||
|
||||
// Otherwise try using the prototype.
|
||||
curObj = typeObj->proto;
|
||||
} else {
|
||||
// Can't optimize setters on watched singleton objects.
|
||||
if (!isGetter && curObj->watched())
|
||||
return true;
|
||||
}
|
||||
|
||||
// Turns out that we need to check for a property lookup op, else we
|
||||
|
9
js/src/jit-test/tests/ion/bug779631.js
Normal file
9
js/src/jit-test/tests/ion/bug779631.js
Normal file
@ -0,0 +1,9 @@
|
||||
var flag = 0;
|
||||
var a = {};
|
||||
Object.defineProperty(a, "value", {set: function(x) {}});
|
||||
a.watch("value", function(){flag++;});
|
||||
|
||||
for(var i = 0; i < 100; i++) {
|
||||
a.value = i;
|
||||
assertEq(flag, i+1);
|
||||
}
|
Loading…
Reference in New Issue
Block a user