diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2010-04-07 16:17:52 (GMT) |
---|---|---|
committer | Kent Hansen <kent.hansen@nokia.com> | 2010-04-07 16:55:18 (GMT) |
commit | e72ead10757ab54d268383ef90f1d0eb31ba8ec5 (patch) | |
tree | edc6ecb848cb0e1ce846eac389a746a1cd55e595 | |
parent | faf02999a4b7eb27c1440a7c8fbb731983da6d60 (diff) | |
download | Qt-e72ead10757ab54d268383ef90f1d0eb31ba8ec5.zip Qt-e72ead10757ab54d268383ef90f1d0eb31ba8ec5.tar.gz Qt-e72ead10757ab54d268383ef90f1d0eb31ba8ec5.tar.bz2 |
Updated JavaScriptCore from /home/khansen/dev/qtwebkit-qtscript-integration to javascriptcore-snapshot-07042010 ( b620465e6f809ddb0f8ed0fb732e9f8498d94755 )
Fix a bug that Math.round() retunrs incorrect results for huge integers
https://bugs.webkit.org/show_bug.cgi?id=34462
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog | 10 | ||||
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp | 3 | ||||
-rw-r--r-- | src/3rdparty/javascriptcore/VERSION | 2 |
3 files changed, 13 insertions, 2 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog index 91b0ea6..9214fa2 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog +++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog @@ -1,3 +1,13 @@ +2010-02-01 Kent Tamura <tkent@chromium.org> + + Reviewed by Darin Adler. + + Fix a bug that Math.round() retunrs incorrect results for huge integers + https://bugs.webkit.org/show_bug.cgi?id=34462 + + * runtime/MathObject.cpp: + (JSC::mathProtoFuncRound): Avoid "arg + 0.5". + 2010-02-01 Patrick Gansterer <paroga@paroga.com> Reviewed by Darin Adler. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp index 98ff3ba..8f22fba 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp @@ -218,7 +218,8 @@ JSValue JSC_HOST_CALL mathProtoFuncRound(ExecState* exec, JSObject*, JSValue, co double arg = args.at(0).toNumber(exec); if (signbit(arg) && arg >= -0.5) return jsNumber(exec, -0.0); - return jsNumber(exec, floor(arg + 0.5)); + double integer = ceil(arg); + return jsNumber(exec, integer - (integer - arg > 0.5)); } JSValue JSC_HOST_CALL mathProtoFuncSin(ExecState* exec, JSObject*, JSValue, const ArgList& args) diff --git a/src/3rdparty/javascriptcore/VERSION b/src/3rdparty/javascriptcore/VERSION index c67d5c2..25e4ee2 100644 --- a/src/3rdparty/javascriptcore/VERSION +++ b/src/3rdparty/javascriptcore/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - b9992e6339bc2bc30933303d3b888fb7eb4ae778 + b620465e6f809ddb0f8ed0fb732e9f8498d94755 |