OSDN Git Service

Fixes a bug in V8 version of jni_utility_private.cpp
authorSteve Block <steveblock@google.com>
Wed, 20 Jan 2010 16:18:49 +0000 (16:18 +0000)
committerSteve Block <steveblock@google.com>
Wed, 20 Jan 2010 16:18:49 +0000 (16:18 +0000)
When CONVERT_NULL_TO_EMPTY_STRING is defined, an 'else' is missing an opening brace.
This causes compiler errors.

This bug has been present since the code was first committed.
See https://android-git.corp.google.com/w/?p=platform/external/webkit.git;a=commitdiff;h=7fa30a60f66c19c8e6fb91ef799bca4d8d6f57f2#patch9

Change-Id: I7e95217d166733e6cab1f2e74725e368df4c6f4b

WebCore/bridge/jni/v8/jni_utility_private.cpp

index 6c8f018..2f89047 100644 (file)
@@ -60,11 +60,11 @@ jvalue convertNPVariantToJValue(NPVariant value, JNIType jniType, const char* ja
                     jchar buf[2];
                     jobject javaString = env->functions->NewString (env, buf, 0);
                     result.l = javaString;
-                }
-                else
+                } else
 #else
-                if (type == NPVariantType_String) {
+                if (type == NPVariantType_String)
 #endif
+                {
                     NPString src = NPVARIANT_TO_STRING(value);
                     JNIEnv *env = getJNIEnv();
                     jobject javaString = env->NewStringUTF(src.UTF8Characters);