WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 70889
Result of Error.prototype.toString not ES5 conformant
https://bugs.webkit.org/show_bug.cgi?id=70889
Summary
Result of Error.prototype.toString not ES5 conformant
mstarzinger
Reported
2011-10-26 02:06:32 PDT
The string representation of Error objects having their 'name' property set to the empty string is incorrect according to the ES5.1 spec. The built-in toString() method should just return the 'message' property for these cases. This is tested by a Test262 test case (i.e. 15.11.4.4-8-1) and can also be reproduced with the following JavaScript snippet. function test() { var err = new Error("The description message"); err.name = ""; return err.toString() === "The description message"; }
Attachments
Fix, needs testing, test case, Changelog.
(4.20 KB, patch)
2011-10-26 22:36 PDT
,
Gavin Barraclough
no flags
Details
Formatted Diff
Diff
Fix
(7.81 KB, patch)
2011-11-15 11:57 PST
,
Gavin Barraclough
oliver
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Gavin Barraclough
Comment 1
2011-10-26 22:36:33 PDT
Created
attachment 112640
[details]
Fix, needs testing, test case, Changelog.
Gavin Barraclough
Comment 2
2011-10-26 22:41:21 PDT
(ooops, ignore the config change!)
Gavin Barraclough
Comment 3
2011-11-15 11:57:38 PST
Created
attachment 115213
[details]
Fix
Gavin Barraclough
Comment 4
2011-11-15 12:35:24 PST
Fixed in
r100310
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug