Reading .next as a VALUE off an iterator-helper object returns undefined; Node 26.5.1 returns the function.
const h: any = [1, 2].values().map((x: number) => x * 2);
console.log(typeof h.next); // node: "function" perry: "undefined"
const orig = 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).
Reading
.nextas a VALUE off an iterator-helper object returnsundefined; Node 26.5.1 returns the function.Calling
h.next()works fine — the class-id method tower dispatches it — only the property read misses, becauseITERATOR_HELPER_CLASS_IDobjects have no attached prototype carryingnextand no bound-method synthesis on the read path. Consequence: theorig = 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 ownnextpatch 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).