Bug 241953 - [JSC] Generic iterator protocol function should be invisible to Function's caller getter
Summary: [JSC] Generic iterator protocol function should be invisible to Function's ca...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-23 18:58 PDT by tuanit96
Modified: 2022-07-18 14:10 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.