Closed Bug 779631 Opened 12 years ago Closed 12 years ago

IonMonkey: Object.watch on own properties of global objects with setters ignored.

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: efaust, Assigned: efaust)

Details

(Whiteboard: [ion:t])

Attachments

(1 file)

The following test case asserts when run with --no-jm:

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);
}
Attached patch FixSplinter Review
Attachment #648076 - Flags: review?(dvander)
Attachment #648076 - Flags: review?(dvander) → review+
https://hg.mozilla.org/projects/ionmonkey/rev/6554cd8235ff
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.