[Webkit-unassigned] [Bug 79843] New: Should not box `this` in strict-mode getters

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 28 16:04:38 PST 2012


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

           Summary: Should not box `this` in strict-mode getters
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: domenic at domenicdenicola.com


The following code should log "number" according to the ES5 spec, section 10.4.3 [1]:


Object.defineProperty(Object.prototype, "getMe", {
    get: function () {
        "use strict";
        console.log(typeof this);
    }
});

(0).getMe;


Instead it logs "object".

See also es-discuss discussion [2] and test-262 bug [3].


[1]: http://es5.github.com/#x10.4.3
[2]: https://mail.mozilla.org/pipermail/es-discuss/2012-February/020781.html
[3]: https://bugs.ecmascript.org/show_bug.cgi?id=284

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