- A non-object `prototype` on `new.target` walks its bound and proxy chain
(GetFunctionRealm), so a get trap that revokes the proxy throws a
TypeError instead of running the constructor.
- A subclassable built-in such as Number no longer unwraps a revoked
`new.target` before its own argument conversion runs.
- for-in records how many proxies came before the object that first listed
each name, and the recheck does not ask those proxies for a descriptor, so
a proxy that did not list a name cannot hide an inherited enumerable one.
- Names from an ownKeys trap take fuel for their code units, and so do the
names the ownKeys invariant check hashes.
- The DataView argument test expects TypeError for a non-buffer and
RangeError for a bad offset or length.
A Symbol key on a proxy read, wrote, tested, deleted and described the
proxy's own Symbol table, so the target never saw it and no trap ran.
Every Symbol path now resolves a proxy the way a string key does: the
get, set, has, deleteProperty, defineProperty and getOwnPropertyDescriptor
traps receive the Symbol, and without a trap the operation reaches the
target with its writable and accessor checks. A super write and a write
on a primitive that reach a proxy go through its [[Set]].
- ownKeys traps may return Symbols; a duplicate Symbol (by identity) or
any other value is a TypeError, and the result is checked against the
target's non-configurable and, for a non-extensible target, all keys
of both kinds, in the target's own key order.
- Reflect.ownKeys lists Symbols, in the trap's order for a proxy, and
Reflect's other functions take Symbol keys. Object.freeze, seal,
isFrozen and isSealed include a proxy's Symbols instead of throwing.
- Symbol key lists stay rooted and charged to the heap until released.
- new Proxy and Proxy.revocable reject a revoked target or handler.
- A typed array reached on the prototype chain as the receiver converts
the value for an index it lacks.
- The eval redeclaration test asserts the runtime SyntaxError.
Reflect.construct of Map, Set, WeakMap and WeakSet with another newTarget fills the collection through the new prototype's adder, new through an empty-handler proxy of a host class constructs the class, Reflect has Symbol.toStringTag, and an ownKeys result is read in full before a duplicate is refused.
A revoked proxy no longer gives its own Symbol properties, the reflect extension reads proxies without running traps, key lists a proxy gives stay counted against the heap while callers use them, has through a proxy of a host collection asks the collection, a proxy's invariant checks keep a namespace's uninitialized-export errors, and a binary constructor checks its arguments before it reads newTarget's prototype. Trap arguments stay rooted while a trap runs.
Reflect.ownKeys and a proxy without an ownKeys trap list integer-index keys in ascending order first. Reflect.construct takes another newTarget for Map, Set and typed arrays, for-in reads each proxy key's descriptor once, deleting a with binding runs only the deleteProperty trap, a write past a typed array's view on the prototype chain is ignored, and a target's descriptor stays reachable while a trap runs. The crate documentation states that traps take string keys only.
A proxy's descriptor and write paths honor a module namespace's uninitialized exports and read-only writes, for-in through proxies counts the keys it keeps against the heap limit, new through an empty-handler proxy of a built-in constructs it, and revoke has its standard name and length. Object.freeze, seal, isFrozen and isSealed throw a TypeError for a proxy whose target chain has Symbol properties.
Function.prototype.bind reads a proxy's prototype through its trap, Object.prototype.toString reads a proxy's Symbol.toStringTag from its target, Reflect.set writes a typed array's elements, a super assignment runs the set trap of a proxy on the home object's chain, and 'in' asks a proxy's has trap once. The name a trap is given is counted against the heap and fuel limits, and Proxy and Reflect stay reachable while their functions are installed.
Proxies join main's construct path in class_ops.rs: new and Reflect.construct both run the construct trap there, with new.target passed through. A Symbol-key lookup passes through a proxy to its target, so spread and for-of read a proxy of an array with the array iterator.
A realm made with Options::es2015 has Proxy, with Proxy.revocable, and
Reflect with its thirteen functions (ECMA-262 11th edition, sections
9.5, 26.1 and 26.2), with string property names. Every internal method
of an object goes through one dispatch, so a proxy's traps run for
property reads and writes, in, delete, for-in, the Object functions,
instanceof, calls and new, and when the proxy is a prototype or a with
object. Array.isArray, concat and JSON.stringify treat a proxy of an
array as an array.
- Each trap result is checked against the target's invariants, and a
violation or an operation on a revoked proxy throws a TypeError.
- Traps take fuel and count against the limit on nested calls.
- A proxy given to a host function throws a TypeError naming the
argument, without running its traps.
- Reflect.construct gives a built-in's result the prototype of
newTarget, and Object with a different newTarget makes a new object.
- for-in skips a name deleted or made non-enumerable during the loop,
and does not ask a has trap.
- Descriptor values a trap returns stay rooted while they are read.
script.run gives a .js file both globals; a .jsx file and a source
string have neither. cargo xtask test262 runs the suite's Proxy and
Reflect tests whose features are present.
Docs: docs/mcp.md, docs/target-app-parity.md.