"name" and "message" enumerable on *Error.prototype

RESOLVED FIXED in mozilla6

Status

()

--
minor
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: erights, Assigned: heycam)

Tracking

Trunk
mozilla6
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

8 years ago
For all so-called NativeError.prototype objects, their "name" and "message" properties are enumerable when they shouldn't be.

I am classifying this as minor since an initialization script can easily repair this using Object.defineProperty.

Comment 1

8 years ago
js> for (i in Error.prototype) print(i)
name
message
fileName
lineNumber

Comment 2

8 years ago
exn_enumerate() looks really weird and unnecessary. Sounds like we can easily fix this for FF5.
Missed when fixing bug 574867.

/be
(Assignee)

Comment 6

8 years ago
I'll try this.
Assignee: general → cam
Status: NEW → ASSIGNED
(Assignee)

Comment 7

8 years ago
Created attachment 525801 [details] [diff] [review]
patch
Attachment #525801 - Flags: review?(gal)

Updated

8 years ago
Attachment #525801 - Flags: review?(gal) → review+
Looks like it landed: http://hg.mozilla.org/mozilla-central/rev/9743d95d473e
Target Milestone: --- → mozilla6
Version: unspecified → Trunk
(Assignee)

Updated

8 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Created attachment 526415 [details] [diff] [review]
followup to remove declaration of removed function

The removed function ("exn_enumerate") is still declared at the top of jsexn.cpp (but never defined or used), which triggers:
../../../mozilla/js/src/jsexn.cpp:83: warning: ‘JSBool exn_enumerate(JSContext*, JSObject*)’ declared ‘static’ but never defined

The attached trivial followup should fix this.
Attachment #526415 - Flags: review?(gal)

Comment 10

8 years ago
Comment on attachment 526415 [details] [diff] [review]
followup to remove declaration of removed function

Thanks.
Attachment #526415 - Flags: review?(gal) → review+
Depends on: 681896
You need to log in before you can comment on or make changes to this bug.