The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla6

Status

()

Core
JavaScript Engine
--
minor
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Mark S. Miller, Assigned: heycam)

Tracking

Trunk
mozilla6
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 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

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

Comment 2

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

/be
(Reporter)

Comment 4

6 years ago
http://code.google.com/p/v8/issues/detail?id=1215
(Reporter)

Comment 5

6 years ago
https://bugs.webkit.org/show_bug.cgi?id=55347
(Assignee)

Comment 6

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

Comment 7

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

Updated

6 years ago
Attachment #525801 - Flags: review?(gal) → review+

Comment 8

6 years ago
Looks like it landed: http://hg.mozilla.org/mozilla-central/rev/9743d95d473e
Target Milestone: --- → mozilla6
Version: unspecified → Trunk
(Assignee)

Updated

6 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 6 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

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

Thanks.
Attachment #526415 - Flags: review?(gal) → review+
Landed followup: http://hg.mozilla.org/mozilla-central/rev/19f14915646a
Depends on: 650646

Updated

6 years ago
Depends on: 681896
You need to log in before you can comment on or make changes to this bug.