Closed Bug 762751 Opened 12 years ago Closed 6 years ago

BaseProxyHandler::set should not give a new own property the attributes of the property it shadows

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jimb, Unassigned)

Details

(Whiteboard: [js:p3])

Suppose we have a proxy that uses BaseProxyHandler::set, and the proxy's getPropertyDescriptor and getOwnPropertyDescriptor methods behave as if x were an inherited value property. In emulation of the ordinary object internal methods' behavior, assigning to the proxy's x property should ask the proxy's handlers to define a new writable, enumerable, and configurable own property x, with the newly assigned value. However, the present code in BaseProxyHandler::set makes the new own property inherit all the attributes (including the value!) of the property it shadows. Bug 738244 fixes the way BaseProxyHandler::set tosses the newly assigned value, but the inheritance of the shadowed property's other attributes is still wrong, and should be fixed.
Whiteboard: [js:p3]
Assignee: general → nobody
Is this still a problem?
Flags: needinfo?(jimb)
This applies to old-style proxies; the test from bug 738244 does: Proxy.create(handlers).x = 43; but Proxy.create doesn't even exist any more.
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(jimb)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.