Closed Bug 1160713 Opened 10 years ago Closed 10 years ago

Proxy triggers indirect traps incorrectly

Categories

(Core :: JavaScript Engine, defect)

40 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: getify, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:40.0) Gecko/20100101 Firefox/40.0 Build ID: 20150427030207 Steps to reproduce: var handlers = { getOwnPropertyDescriptor(target,prop) { console.log( "getOwnPropertyDescriptor" ); return Object.getOwnPropertyDescriptor( target, prop ); }, defineProperty(target,prop,desc){ console.log( "defineProperty" ); return Object.defineProperty( target, prop, desc ); } }, proxy = new Proxy( {}, handlers ); proxy.a = 2; // getOwnPropertyDescriptor // defineProperty Expected results: According to 9.5.9, the default `[[Set]]` handler should not be firing `[[GetOwnProperty]]` or `[[DefineOwnProperty]]` traps on the proxy object (all actions should be against the target)
OS: Unspecified → All
Hardware: Unspecified → All
Closing my own bug. Sorry for false alarm. For posterity sake, 9.5.9 does indeed say target[[Set]], but in 9.1.9, it says receiver[[GetOwnProperty]], etc.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.