[Webkit-unassigned] [Bug 34553] arguments.callee.caller is null in JavaScript functions defined in top and called via fn.call() or fn.apply() from an iframe

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 9 05:30:46 PDT 2010


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


Andrea Giammarchi <andrea.giammarchi at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrea.giammarchi at gmail.com




--- Comment #3 from Andrea Giammarchi <andrea.giammarchi at gmail.com>  2010-09-09 05:30:46 PST ---
same happens for getters/setters, e.g.

var o = {
    exec: function exec() {
        var wtf = this.test;
    }
};

Object.defineProperty(o, "test", {
    get: function get() {
        alert(get.caller);
        return "test";
    }
});

o.exec();

Expected result: get.caller should be the function exec

Current result: get.caller is null

This happens only in WebKit ( latest nightly ) and Safari. It works as expected in every other browser.
The same thing can be reproducible via __defineGetter__ or __defineSetter__

var o = {
    exec: function exec() {
        var wtf = this.test;
    }
};

o.__defineGetter__("test", function test() {
    alert(test.caller);
    return "test";
});

o.exec();

Please fix this stuff and consider to put caller in ES5 specs since it is extremely important ( and you have it internally for scope resolution reason ), thanks.

Best Regards,
    Andrea Giammarchi

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list