diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
commit | cfd86b747d32ac22246a1aa908eaa720c63a88c1 (patch) | |
tree | 24d68c6f61c464ecba1e05670b80390ea3b0e50c /Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp | |
parent | 69d7c744c9de19d152dbe2d8e46eb7dfd4511d1a (diff) | |
download | qtwebkit-cfd86b747d32ac22246a1aa908eaa720c63a88c1.tar.gz |
Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733)
New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes.
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp b/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp index 8b1acb25a..7ac76d350 100644 --- a/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp +++ b/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp @@ -276,7 +276,7 @@ static double parseInt(const String& s, const CharType* data, int radix) // 8.a If R < 2 or R > 36, then return NaN. if (radix < 2 || radix > 36) - return std::numeric_limits<double>::quiet_NaN(); + return QNaN; // 13. Let mathInt be the mathematical integer value that is represented by Z in radix-R notation, using the letters // A-Z and a-z for digits with values 10 through 35. (However, if R is 10 and Z contains more than 20 significant @@ -299,7 +299,7 @@ static double parseInt(const String& s, const CharType* data, int radix) // 12. If Z is empty, return NaN. if (!sawDigit) - return std::numeric_limits<double>::quiet_NaN(); + return QNaN; // Alternate code path for certain large numbers. if (number >= mantissaOverflowLowerBound) { @@ -397,7 +397,7 @@ static double jsStrDecimalLiteral(const CharType*& data, const CharType* end) } // Not a number. - return std::numeric_limits<double>::quiet_NaN(); + return QNaN; } template <typename CharType> @@ -427,7 +427,7 @@ static double toDouble(const CharType* characters, unsigned size) break; } if (characters != endCharacters) - return std::numeric_limits<double>::quiet_NaN(); + return QNaN; return number; } @@ -443,7 +443,7 @@ double jsToNumber(const String& s) return c - '0'; if (isStrWhiteSpace(c)) return 0; - return std::numeric_limits<double>::quiet_NaN(); + return QNaN; } if (s.is8Bit()) @@ -459,7 +459,7 @@ static double parseFloat(const String& s) UChar c = s[0]; if (isASCIIDigit(c)) return c - '0'; - return std::numeric_limits<double>::quiet_NaN(); + return QNaN; } if (s.is8Bit()) { @@ -474,7 +474,7 @@ static double parseFloat(const String& s) // Empty string. if (data == end) - return std::numeric_limits<double>::quiet_NaN(); + return QNaN; return jsStrDecimalLiteral(data, end); } @@ -490,7 +490,7 @@ static double parseFloat(const String& s) // Empty string. if (data == end) - return std::numeric_limits<double>::quiet_NaN(); + return QNaN; return jsStrDecimalLiteral(data, end); } |