diff options
| author | Ben Murdoch <benm@google.com> | 2010-08-11 14:44:44 +0100 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2010-08-12 19:15:41 +0100 |
| commit | dd8bb3de4f353a81954234999f1fea748aee2ea9 (patch) | |
| tree | 729b52bf09294f0d6c67cd5ea80aee1b727b7bd8 /JavaScriptCore/API | |
| parent | f3d41ba51d86bf719c7a65ab5297aea3c17e2d98 (diff) | |
| download | external_webkit-dd8bb3de4f353a81954234999f1fea748aee2ea9.zip external_webkit-dd8bb3de4f353a81954234999f1fea748aee2ea9.tar.gz external_webkit-dd8bb3de4f353a81954234999f1fea748aee2ea9.tar.bz2 | |
Merge WebKit at r65072 : Initial merge by git.
Change-Id: Ibcf418498376b2660aacb7f8d46ea7085ef91585
Diffstat (limited to 'JavaScriptCore/API')
| -rw-r--r-- | JavaScriptCore/API/JSValueRef.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/JavaScriptCore/API/JSValueRef.cpp b/JavaScriptCore/API/JSValueRef.cpp index a29a207..c22e8d8 100644 --- a/JavaScriptCore/API/JSValueRef.cpp +++ b/JavaScriptCore/API/JSValueRef.cpp @@ -213,6 +213,12 @@ JSValueRef JSValueMakeNumber(JSContextRef ctx, double value) ExecState* exec = toJS(ctx); APIEntryShim entryShim(exec); + // Our JSValue representation relies on a standard bit pattern for NaN. NaNs + // generated internally to JavaScriptCore naturally have that representation, + // but an external NaN might not. + if (isnan(value)) + value = NaN; + return toRef(exec, jsNumber(exec, value)); } |
