WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
16672
Number.toString does not throw exceptions like it should
https://bugs.webkit.org/show_bug.cgi?id=16672
Summary
Number.toString does not throw exceptions like it should
Eric Seidel (no email)
Reported
2007-12-30 00:16:58 PST
Number.toString does not throw exceptions like it should Patch to fix this coming up.
Attachments
Reviewed by Sam.
(15.16 KB, patch)
2007-12-30 00:17 PST
,
Eric Seidel (no email)
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2007-12-30 00:17:58 PST
Created
attachment 18180
[details]
Reviewed by Sam. Update Number.toString to properly throw exceptions. Cleanup code in Number.toString implementation. * kjs/number_object.cpp: (KJS::numberToString): * kjs/object.cpp: (KJS::Error::create): Remove bogus debug lines. --- JavaScriptCore/ChangeLog | 12 +++ JavaScriptCore/kjs/number_object.cpp | 100 +++++++++++--------- JavaScriptCore/kjs/object.cpp | 12 --- LayoutTests/ChangeLog | 13 +++ .../fast/js/number-toExponential-expected.txt | 12 ++- LayoutTests/fast/js/number-toExponential.html | 13 +++ LayoutTests/fast/js/number-toString-expected.txt | 25 +++--- LayoutTests/fast/js/resources/number-toString.js | 1 + 8 files changed, 114 insertions(+), 74 deletions(-)
Sam Weinig
Comment 2
2007-12-30 00:37:45 PST
Comment on
attachment 18180
[details]
Reviewed by Sam. This can be move up a little to return a little earlier. + double x = v->toNumber(exec); + if (isnan(x) || isinf(x)) + return jsString(UString::from(x)); The change to object.cpp seems unrelated. We should also test toString() with a fractional argument. r=me
Eric Seidel (no email)
Comment 3
2007-12-30 00:43:13 PST
r29036
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