diff options
author | Steve Block <steveblock@google.com> | 2010-02-04 06:54:49 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-02-04 06:54:49 -0800 |
commit | 3c0ba7aa180a1d6aae9a7f69a5d18261d2afb0a7 (patch) | |
tree | e422d9c5a689bd8d9917c35b3779c4e25677f9e5 | |
parent | edfe3a5175efb80966f71463612aaa1a169074a4 (diff) | |
parent | ec806ad380c9756fb544d2adf1cff61be9b9320f (diff) | |
download | external_webkit-3c0ba7aa180a1d6aae9a7f69a5d18261d2afb0a7.zip external_webkit-3c0ba7aa180a1d6aae9a7f69a5d18261d2afb0a7.tar.gz external_webkit-3c0ba7aa180a1d6aae9a7f69a5d18261d2afb0a7.tar.bz2 |
Merge "Fix a bug when converting double and float types from NP variants to JNI types on V8"
-rw-r--r-- | WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp b/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp index 2edb192..38f38f6 100644 --- a/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp +++ b/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp @@ -133,23 +133,29 @@ jvalue convertNPVariantToJValue(NPVariant value, JNIType jniType, const char* ja case float_type: { +#if PLATFORM(ANDROID) + // TODO: Upstream this fix to webkit.org if (type == NPVariantType_Int32) - result.j = static_cast<jfloat>(NPVARIANT_TO_INT32(value)); + result.f = static_cast<jfloat>(NPVARIANT_TO_INT32(value)); else if (type == NPVariantType_Double) - result.j = static_cast<jfloat>(NPVARIANT_TO_DOUBLE(value)); + result.f = static_cast<jfloat>(NPVARIANT_TO_DOUBLE(value)); else bzero(&result, sizeof(jvalue)); +#endif } break; case double_type: { +#if PLATFORM(ANDROID) + // TODO: Upstream this fix to webkit.org if (type == NPVariantType_Int32) - result.j = static_cast<jdouble>(NPVARIANT_TO_INT32(value)); + result.d = static_cast<jdouble>(NPVARIANT_TO_INT32(value)); else if (type == NPVariantType_Double) - result.j = static_cast<jdouble>(NPVARIANT_TO_DOUBLE(value)); + result.d = static_cast<jdouble>(NPVARIANT_TO_DOUBLE(value)); else bzero(&result, sizeof(jvalue)); +#endif } break; |