Last Comment Bug 779631 - IonMonkey: Object.watch on own properties of global objects with setters ignored.
: IonMonkey: Object.watch on own properties of global objects with setters igno...
Status: RESOLVED FIXED
[ion:t]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: Eric Faust [:efaust]
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-01 14:02 PDT by Eric Faust [:efaust]
Modified: 2012-08-01 14:20 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix (1.35 KB, patch)
2012-08-01 14:10 PDT, Eric Faust [:efaust]
dvander: review+
Details | Diff | Splinter Review

Description Eric Faust [:efaust] 2012-08-01 14:02:28 PDT
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);
}
Comment 1 Eric Faust [:efaust] 2012-08-01 14:10:36 PDT
Created attachment 648076 [details] [diff] [review]
Fix
Comment 2 Eric Faust [:efaust] 2012-08-01 14:20:06 PDT
https://hg.mozilla.org/projects/ionmonkey/rev/6554cd8235ff

Note You need to log in before you can comment on or make changes to this bug.