Closed
Bug 635010
Opened 13 years ago
Closed 13 years ago
new Error(undefined).hasOwnProperty("message") should be false
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jorendorff, Unassigned)
References
Details
(Whiteboard: [fixed-in-tracemonkey])
Attachments
(1 file, 2 obsolete files)
5.28 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
We fail http://test262.ecmascript.org/ test S15.11.1.1_A1_T1. Basically assertEq("message" in new Error(undefined), false); I checked the spec. The test is right. We're wrong. http://people.mozilla.org/~jorendorff/es5.html#sec-15.11.1.1
Reporter | ||
Comment 1•13 years ago
|
||
S15.11.1.1_A1_T1 tests `Error(undefined)`. S15.11.2.1_A1_T1 tests `new Error(undefined)`. We fail both for the same reason.
Comment 2•13 years ago
|
||
Attachment #517275 -
Flags: review?(jorendorff)
Comment 3•13 years ago
|
||
Fixed bug regarding new Error(undefined), and added some test.
Attachment #517275 -
Attachment is obsolete: true
Attachment #517275 -
Flags: review?(jorendorff)
Updated•13 years ago
|
Attachment #517444 -
Flags: review?(jorendorff)
Reporter | ||
Comment 4•13 years ago
|
||
Comment on attachment 517444 [details] [diff] [review] v2 fixed bug + test Thanks for the patch. I applied it... but it doesn't seem to fix the bug! js> assertEq("message" in new Error(undefined), false); typein:3: Error: Assertion failed: got true, expected false js> assertEq("message" in new Error(), false); typein:4: Error: Assertion failed: got true, expected false Am I doing something wrong? Note that tests under js/src/tests need to end with a line like: reportCompare(0, 0, 'ok'); and the test has to be added to the jstests.list file in the same directory.
Attachment #517444 -
Flags: review?(jorendorff)
Comment 5•13 years ago
|
||
Oh sorry, forgot to mention this. The right test is actually, different, i checked test262, and they use this, too. I have no idea where the "in" came from. (new Error(undefined)).hasOwnProperty('message') => false The "in" test makes no sense, because Error.prototype has an message property with an empty string as value. My last patch is already a little while back, so i am already forgetting things, bad ;)
Attachment #517444 -
Attachment is obsolete: true
Updated•13 years ago
|
Attachment #517444 -
Flags: review?(jorendorff)
Reporter | ||
Comment 6•13 years ago
|
||
Comment on attachment 517745 [details] [diff] [review] v3 fixed tests That makes sense! Nice work.
Attachment #517745 -
Flags: review+
Reporter | ||
Comment 7•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/2a7515434a1d
Summary: "message" in new Error(undefined) should be false → new Error(undefined).hasOwnProperty("message") should be false
Whiteboard: [fixed-in-tracemonkey]
Reporter | ||
Updated•13 years ago
|
Attachment #517444 -
Flags: review?(jorendorff)
Comment 8•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/2a7515434a1d
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•