Closed Bug 625438 Opened 9 years ago Closed 9 years ago

JM: watch handler is not always called

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: jandem, Assigned: dvander)

References

Details

(Whiteboard: [hardblocker][fixed-in-tracemonkey])

Attachments

(1 file)

Testcase:
--
var count = 0;
watch("x", function() {
    count++;
});
for(var i=0; i<10; i++) {
    x = 2;
}
print(count);
--
Output:

-m: 1
-j: 10
interp: 10
Btw adding a print('test'); statement inside the handler makes it print 2 instead of 1.
blocking2.0: --- → ?
Attached patch fixSplinter Review
Method JIT is testing getterness instead of setterness in SetGlobalName().
Assignee: general → dvander
Status: NEW → ASSIGNED
Attachment #503558 - Flags: review?(jorendorff)
Whiteboard: hardblocker
blocking2.0: ? → betaN+
Comment on attachment 503558 [details] [diff] [review]
fix

Yecch, that's a gross bug. Looks like exactly the right fix.
Attachment #503558 - Flags: review?(jorendorff) → review+
http://hg.mozilla.org/tracemonkey/rev/96f460867847
Whiteboard: hardblocker → [hardblocker][fixed-in-tracemonkey]
http://hg.mozilla.org/mozilla-central/rev/96f460867847
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.