Closed Bug 605596 Opened 14 years ago Closed 7 years ago

Object.prototype.watch won't set watchpoints on setters defined with Object.defineProperty.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 638054

People

(Reporter: jimb, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Object.prototype.watch will set watchpoints on setters created with __defineSetter__ or written in an object literal, but will not set watchpoints on setters created with Object.defineProperty.

In the latter case, the shape is marked JSPROP_READONLY, and obj_watch declines to set the watchpoint.
Blocks: 609924
Making this depend on the new watchpoint implementation, rather optimistically. I bet it fixes this. ;)
Depends on: 637985
Comment on attachment 484447 [details] [diff] [review]
Add test for setting watchpoints on setters created with Object.defineProperty.

This test passes now.

I'll land this patch along with the trivial change in bug 604781.
Attachment #484447 - Flags: review+
Blocks: 633637
Assignee: general → nobody
watch() was removed in bug 638054.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: