getter defined on Number.prototype receives an object insteand of number in strict mode

RESOLVED DUPLICATE of bug 603201

Status

()

RESOLVED DUPLICATE of bug 603201
4 years ago
4 years ago

People

(Reporter: vic99999, Unassigned)

Tracking

30 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36

Steps to reproduce:

test case:
<script>
"use strict";

Object.defineProperty(Number.prototype, "value", {
  get: function () {
    "use strict";
    alert(typeof this);
  }
});

(0).value;
</script>



Actual results:

alerts "object", instead of "number"
(Reporter)

Updated

4 years ago
Component: Untriaged → JavaScript Engine
Product: Firefox → Core

Updated

4 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 603201
You need to log in before you can comment on or make changes to this bug.