Object.defineProperty throws an Error not a TypeError

RESOLVED DUPLICATE of bug 598996

Status

()

RESOLVED DUPLICATE of bug 598996
8 years ago
8 years ago

People

(Reporter: bruant.d, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: FF4RC1

Test case:
-------------------
(function testcase() {
    var arrObj = [];
    try {
        Object.defineProperty(arrObj, "length", {configurable: true});
        return false;
    } catch (e) {
        alert(e instanceof Error);
        return e instanceof TypeError;
    }
})();
-------------------
When there is an Object.defineProperty error due to unconfigurable properties, a TypeError should be thrown, not an Error.
In the WebConsole and Bugzilla 1.7X.0b1, the Error is an InternalError apparently.


Reproducible: Always
(Reporter)

Comment 1

8 years ago
Noticed when reviewing Test262 Test 15.2.3.6-4-120
(a bunch of other tests fail for the same reason)
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 598996
You need to log in before you can comment on or make changes to this bug.