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
Iterator-helper objects: .next value read returns undefined (bind-delegation impossible) #9068
Reading .next as a VALUE off an iterator-helper object returns undefined; Node 26.5.1 returns the function.
consth: any=[1,2].values().map((x: number)=>x*2);console.log(typeofh.next);// node: "function" perry: "undefined"constorig=h.next.bind(h);// node: ok perry: TypeError: Bind must be called on a function
Calling h.next() works fine — the class-id method tower dispatches it — only the property read misses, because ITERATOR_HELPER_CLASS_ID objects have no attached prototype carrying next and no bound-method synthesis on the read path. Consequence: the orig = it.next.bind(it)-style delegation that #9019/#9066 made work on the array/map/set/string/buffer/regexp families is impossible on helpers (an own next patch on a helper is honored since #9066 — only the read of the builtin is missing).
Found while validating #9066 on this exact probe; the buffer and regexp-string families resolve the read fine, so this is helper-specific. Pre-existing relative to #9066 (that PR touches the write/dispatch paths only, not property reads).
Activity