[Webkit-unassigned] [Bug 241953] New: Access to caller from iterator function

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 23 18:58:51 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=241953

            Bug ID: 241953
           Summary: Access to caller from iterator function
           Product: WebKit
           Version: Safari 15
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: tuanit96 at gmail.com

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);

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220624/4f544435/attachment.htm>


More information about the webkit-unassigned mailing list