Closed Bug 1135090 Opened 11 years ago Closed 11 years ago

Strict getter should be called with primitive.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 603201

People

(Reporter: erik, Unassigned)

Details

Given: ```js 'use strict'; Object.defineProperty(Number.prototype, 'x', { get: function() { console.log(typeof this); return function() { console.log(typeof this); return 42 } }, configurable: true }); 1 .x() ``` This prints number number in Chrome, Safari and Internet Explorer, but it prints object number in Firefox. The spec uses GetValue(V, P) which ends up doing a O.[[Get]](P, V) which means that the receiver should be the primitive value. https://people.mozilla.org/~jorendorff/es6-draft.html#sec-getv https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ordinary-object-internal-methods-and-internal-slots-get-p-receiver
Hardware: x86 → All
This is bug 603201. Waldo, is that still on your radar?
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.