Bug 79843
Summary: | Should not box `this` in strict-mode getters | ||
---|---|---|---|
Product: | WebKit | Reporter: | Domenic Denicola <domenic> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | barraclough, erights, oliver |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Domenic Denicola
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
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Gavin Barraclough
Please retest in a nightly, this is already fixed. :-)
*** This bug has been marked as a duplicate of bug 79588 ***