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
bug: built-in prototype methods (Object/Number.prototype isPrototypeOf, hasOwnProperty, …) undefined as property values and via primitive receivers #2059
A function's built-in name own-property reads back undefined, and Object.getOwnPropertyDescriptor(fn, "name") returns undefined. Per spec, name is a { writable:false, enumerable:false, configurable:true } own data property.
built-ins/Function was ~20% in the #799 Test262 baseline, dominated (22× in the sample) by Cannot read properties of undefined (reading 'name'). It also breaks Test262's assert.throws, which reports thrown.constructor.name (assert.js:130-131) — degrading error reporting across all negative tests. And it breaks ordinary fn.name usage (router tables, DI containers, logging).
Likely cause
name (and likely other built-in own data properties) is not installed on function objects. Note length works, so the function-object property machinery exists — name specifically is not being populated from the declaration/binding identifier.
Related: #1802 (custom property on a function object reads back undefined) — adjacent, but this is the spec built-in name.
Activity
fix(typedarray): gate index fast path to numeric keys so method acces…
fix(runtime): function `.name` own-property + getOwnPropertyDescripto…
fix: built-in prototype methods on all built-in prototypes resolve as…
fix(hir): built-in function `.name` own-property (#2144) (#2185)