You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proxy defineProperty trap skips the required target extensibility check #1626
d8> Reflect.defineProperty(new Proxy(new Proxy({}, { isExtensible: 0 }), { defineProperty() { returntrue; } }), "x", {});
TypeError: '0' returned for property 'isExtensible' of object '#<Object>' is not a function
Actual (QuickJS-ng)
QuickJS-ng returns true without checking the target's isExtensible trap:
After the defineProperty trap returns a truthy value, the Proxy [[DefineOwnProperty]] method obtains the target's property descriptor and calls IsExtensible(target).
Here, the target is the inner Proxy. Its [[IsExtensible]] method obtains the handler's isExtensible method. Since its value is 0, which is not callable, this operation must throw a TypeError.
Therefore, Reflect.defineProperty must propagate the TypeError instead of returning true.
Activity
saghul commentedon Aug 2, 2026
Thanks for the report!
Check target extensibility via IsExtensible() in the proxy invariant …