Closed
Bug 637207
Opened 14 years ago
Closed 14 years ago
"name" and "message" enumerable on *Error.prototype
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla6
People
(Reporter: erights, Assigned: heycam)
References
Details
Attachments
(2 files)
7.88 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
635 bytes,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
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•14 years ago
|
||
js> for (i in Error.prototype) print(i)
name
message
fileName
lineNumber
Comment 2•14 years ago
|
||
exn_enumerate() looks really weird and unnecessary. Sounds like we can easily fix this for FF5.
Comment 3•14 years ago
|
||
Missed when fixing bug 574867.
/be
Reporter | ||
Comment 4•14 years ago
|
||
Reporter | ||
Comment 5•14 years ago
|
||
Assignee | ||
Comment 7•14 years ago
|
||
Attachment #525801 -
Flags: review?(gal)
Updated•14 years ago
|
Attachment #525801 -
Flags: review?(gal) → review+
Comment 8•14 years ago
|
||
Looks like it landed: http://hg.mozilla.org/mozilla-central/rev/9743d95d473e
Target Milestone: --- → mozilla6
Version: unspecified → Trunk
Assignee | ||
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 9•14 years ago
|
||
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•14 years ago
|
||
Comment on attachment 526415 [details] [diff] [review]
followup to remove declaration of removed function
Thanks.
Attachment #526415 -
Flags: review?(gal) → review+
Comment 11•14 years ago
|
||
Landed followup: http://hg.mozilla.org/mozilla-central/rev/19f14915646a
You need to log in
before you can comment on or make changes to this bug.
Description
•