Bug 241953

Summary: [JSC] Generic iterator protocol function should be invisible to Function's caller getter
Product: WebKit Reporter: tuanit96
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, saam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Unspecified   
OS: Unspecified   

Description tuanit96 2022-06-23 18:58:51 PDT
This code should have returned function foo instead of null

function foo(arr) {
    return [...arr];
}

let obj = {};
obj[Symbol.iterator] = function bar () {
    alert(arguments.callee.caller);
    return {
        next() { return { done: true }; }
    };
};
foo(obj);
Comment 1 Radar WebKit Bug Importer 2022-06-30 16:25:41 PDT
<rdar://problem/96253786>
Comment 2 Yusuke Suzuki 2022-07-17 17:37:55 PDT
Pull request: https://github.com/WebKit/WebKit/pull/2498
Comment 3 EWS 2022-07-18 14:10:36 PDT
Committed 252578@main (1a1af3bd846d): <https://commits.webkit.org/252578@main>

Reviewed commits have been landed. Closing PR #2498 and removing active labels.