Bug 79843 - Should not box `this` in strict-mode getters
Summary: Should not box `this` in strict-mode getters
Status: RESOLVED DUPLICATE of bug 79588
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-28 16:04 PST by Domenic Denicola
Modified: 2012-03-01 09:26 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Domenic Denicola 2012-02-28 16:04:38 PST
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
Comment 1 Gavin Barraclough 2012-02-29 15:29:30 PST
Please retest in a nightly, this is already fixed. :-)

*** This bug has been marked as a duplicate of bug 79588 ***