Update V8 JNI bridge code to match final version submitted to webkit.org

No functional changes, style changes only

See the following WebKit changes ...
JavaStringV8 : http://trac.webkit.org/changeset/54132
JavaInstanceV8 : http://trac.webkit.org/changeset/54165
JavaClassV8 : http://trac.webkit.org/changeset/54169
JNIUtilityPrivate : http://trac.webkit.org/changeset/54171
JNIBridgeV8 : http://trac.webkit.org/changeset/54175
JavaNPObjectV8 : http://trac.webkit.org/changeset/54237

Change-Id: I7cc9d19e74043d1bac1a576cdc97a780fe317b5d
diff --git a/WebCore/Android.v8bindings.mk b/WebCore/Android.v8bindings.mk
index ffbcc20..57c22b9 100644
--- a/WebCore/Android.v8bindings.mk
+++ b/WebCore/Android.v8bindings.mk
@@ -179,6 +179,6 @@
 	bridge/jni/JNIUtility.cpp \
 	bridge/jni/v8/JNIBridgeV8.cpp \
 	bridge/jni/v8/JNIUtilityPrivate.cpp \
-	bridge/jni/v8/JavaNPObjectV8.cpp \
 	bridge/jni/v8/JavaClassV8.cpp \
-	bridge/jni/v8/JavaInstanceV8.cpp
+	bridge/jni/v8/JavaInstanceV8.cpp \
+	bridge/jni/v8/JavaNPObjectV8.cpp
diff --git a/WebCore/bridge/jni/JNIBridge.h b/WebCore/bridge/jni/JNIBridge.h
index c48ed98..5d482a7 100644
--- a/WebCore/bridge/jni/JNIBridge.h
+++ b/WebCore/bridge/jni/JNIBridge.h
@@ -32,8 +32,6 @@
 #include "Bridge.h"
 #include "JNIUtility.h"
 
-// ANDROID
-// Upstream the V8 ifdef to webkit.org
 #if USE(JSC)
 #include "JavaStringJSC.h"
 #elif USE(V8)
diff --git a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
index 9fd37d2..4d403ab 100644
--- a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
+++ b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
@@ -118,7 +118,7 @@
     size_t numMethods = methodList.size();
 
     // Try to find a good match for the overloaded method.  The
-    // fundamental problem is that JavaScript doesn have the
+    // fundamental problem is that JavaScript doesn't have the
     // notion of method overloading and Java does.  We could
     // get a bit more sophisticated and attempt to does some
     // type checking as we as checking the number of parameters.
diff --git a/WebCore/bridge/jni/v8/JNIBridgeV8.h b/WebCore/bridge/jni/v8/JNIBridgeV8.h
index eb5c77a..23989ce 100644
--- a/WebCore/bridge/jni/v8/JNIBridgeV8.h
+++ b/WebCore/bridge/jni/v8/JNIBridgeV8.h
@@ -26,16 +26,14 @@
 #ifndef JNIBridgeV8_h
 #define JNIBridgeV8_h
 
-#include "JNIBridge.h"
-#include "JNIUtility.h"
-#include "JavaInstanceV8.h"
+#include "JNIBridge.h" // For JavaString
+#include "JavaInstanceV8.h" // For JObjectWrapper
 
 namespace JSC {
 
 namespace Bindings {
 
-class JavaField
-{
+class JavaField {
 public:
     JavaField(JNIEnv*, jobject aField);
 
diff --git a/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp b/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp
index a6cfb2d..2edb192 100644
--- a/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp
+++ b/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009, The Android Open Source Project
+ * Copyright 2010, The Android Open Source Project
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "JNIUtilityPrivate.h"
 
-#include "JNIBridge.h"
 #include "JavaInstanceV8.h"
 #include "JavaNPObjectV8.h"
 
@@ -188,8 +187,7 @@
                     STRINGZ_TO_NPVARIANT(s, *result);
                 } else
                     OBJECT_TO_NPVARIANT(JavaInstanceToNPObject(new JavaInstance(value.l)), *result);
-            }
-            else
+            } else
                 VOID_TO_NPVARIANT(*result);
         }
         break;
@@ -252,6 +250,6 @@
     }
 }
 
-}  // end of namespace Bindings
+} // end of namespace Bindings
 
 } // end of namespace JSC
diff --git a/WebCore/bridge/jni/v8/JNIUtilityPrivate.h b/WebCore/bridge/jni/v8/JNIUtilityPrivate.h
index f20cfb2..951c1e8 100644
--- a/WebCore/bridge/jni/v8/JNIUtilityPrivate.h
+++ b/WebCore/bridge/jni/v8/JNIUtilityPrivate.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009, The Android Open Source Project
+ * Copyright 2010, The Android Open Source Project
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
diff --git a/WebCore/bridge/jni/v8/JavaClassV8.cpp b/WebCore/bridge/jni/v8/JavaClassV8.cpp
index 8d794ee..02a57ea 100644
--- a/WebCore/bridge/jni/v8/JavaClassV8.cpp
+++ b/WebCore/bridge/jni/v8/JavaClassV8.cpp
@@ -1,5 +1,4 @@
 /*
- * Copyright (C) 2010 Apple Computer, Inc.  All rights reserved.
  * Copyright 2010, The Android Open Source Project
  *
  * Redistribution and use in source and binary forms, with or without
@@ -27,8 +26,6 @@
 #include "config.h"
 #include "JavaClassV8.h"
 
-#include "JNIBridge.h"
-#include "JNIUtility.h"
 
 using namespace JSC::Bindings;
 
@@ -41,7 +38,7 @@
         return;
     }
 
-    jstring className = (jstring)callJNIMethod<jobject>(aClass, "getName", "()Ljava/lang/String;");
+    jstring className = static_cast<jstring>(callJNIMethod<jobject>(aClass, "getName", "()Ljava/lang/String;"));
     const char* classNameC = getCharactersFromJString(className);
     m_name = strdup(classNameC);
     releaseCharactersForJString(className, classNameC);
@@ -50,10 +47,10 @@
     JNIEnv* env = getJNIEnv();
 
     // Get the fields
-    jarray fields = (jarray)callJNIMethod<jobject>(aClass, "getFields", "()[Ljava/lang/reflect/Field;");
+    jarray fields = static_cast<jarray>(callJNIMethod<jobject>(aClass, "getFields", "()[Ljava/lang/reflect/Field;"));
     int numFields = env->GetArrayLength(fields);
     for (i = 0; i < numFields; i++) {
-        jobject aJField = env->GetObjectArrayElement((jobjectArray)fields, i);
+        jobject aJField = env->GetObjectArrayElement(static_cast<jobjectArray>(fields), i);
         JavaField* aField = new JavaField(env, aJField); // deleted in the JavaClass destructor
         {
             m_fields.set(aField->name().UTF8String(), aField);
@@ -62,10 +59,10 @@
     }
 
     // Get the methods
-    jarray methods = (jarray)callJNIMethod<jobject>(aClass, "getMethods", "()[Ljava/lang/reflect/Method;");
+    jarray methods = static_cast<jarray>(callJNIMethod<jobject>(aClass, "getMethods", "()[Ljava/lang/reflect/Method;"));
     int numMethods = env->GetArrayLength(methods);
     for (i = 0; i < numMethods; i++) {
-        jobject aJMethod = env->GetObjectArrayElement((jobjectArray)methods, i);
+        jobject aJMethod = env->GetObjectArrayElement(static_cast<jobjectArray>(methods), i);
         JavaMethod* aMethod = new JavaMethod(env, aJMethod); // deleted in the JavaClass destructor
         MethodList* methodList;
         {
@@ -85,7 +82,7 @@
 
 JavaClass::~JavaClass()
 {
-    free((void*)m_name);
+    free(const_cast<char*>(m_name));
 
     deleteAllValues(m_fields);
     m_fields.clear();
diff --git a/WebCore/bridge/jni/v8/JavaClassV8.h b/WebCore/bridge/jni/v8/JavaClassV8.h
index 2533d0e..ae4806a 100644
--- a/WebCore/bridge/jni/v8/JavaClassV8.h
+++ b/WebCore/bridge/jni/v8/JavaClassV8.h
@@ -1,5 +1,4 @@
 /*
- * Copyright (C) 2010 Apple Computer, Inc.  All rights reserved.
  * Copyright 2010, The Android Open Source Project
  *
  * Redistribution and use in source and binary forms, with or without
diff --git a/WebCore/bridge/jni/v8/JavaInstanceV8.cpp b/WebCore/bridge/jni/v8/JavaInstanceV8.cpp
index 4d6b49f..a926704 100644
--- a/WebCore/bridge/jni/v8/JavaInstanceV8.cpp
+++ b/WebCore/bridge/jni/v8/JavaInstanceV8.cpp
@@ -1,19 +1,20 @@
 /*
+ * Copyright (C) 2003, 2008, 2010 Apple Inc. All rights reserved.
  * Copyright 2010, The Android Open Source Project
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 1. Redistributions of source code must retain the above copyright
+ *  * Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
+ *  * Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -27,7 +28,7 @@
 #include "JavaInstanceV8.h"
 
 #include "JNIBridge.h"
-#include "JNIUtility.h"
+#include "JNIUtilityPrivate.h"
 #include "JavaClassV8.h"
 
 #include <assert.h>
@@ -51,9 +52,8 @@
 
 JavaClass* JavaInstance::getClass() const
 {
-    if (!m_class) {
+    if (!m_class)
         m_class = new JavaClass(javaInstance());
-    }
     return m_class;
 }
 
@@ -66,7 +66,7 @@
     size_t numMethods = methodList.size();
 
     // Try to find a good match for the overloaded method.  The
-    // fundamental problem is that JavaScript doesn have the
+    // fundamental problem is that JavaScript doesn't have the
     // notion of method overloading and Java does.  We could
     // get a bit more sophisticated and attempt to does some
     // type checking as we as checking the number of parameters.
@@ -88,7 +88,7 @@
 
     jvalue* jArgs = 0;
     if (count > 0)
-        jArgs = (jvalue*)malloc (count * sizeof(jvalue));
+        jArgs = static_cast<jvalue*>(malloc(count * sizeof(jvalue)));
 
     for (int i = 0; i < count; i++) {
         JavaParameter* aParameter = jMethod->parameterAt(i);
@@ -159,10 +159,11 @@
     LOGV("new global ref %p for %p\n", m_instance, instance);
 
     if (!m_instance)
-        fprintf (stderr, "%s:  could not get GlobalRef for %p\n", __PRETTY_FUNCTION__, instance);
+        fprintf(stderr, "%s:  could not get GlobalRef for %p\n", __PRETTY_FUNCTION__, instance);
 }
 
-JObjectWrapper::~JObjectWrapper() {
+JObjectWrapper::~JObjectWrapper()
+{
     LOGV("deleting global ref %p\n", m_instance);
     m_env->DeleteGlobalRef(m_instance);
 }
diff --git a/WebCore/bridge/jni/v8/JavaInstanceV8.h b/WebCore/bridge/jni/v8/JavaInstanceV8.h
index dcd51e8..c18f2d6 100644
--- a/WebCore/bridge/jni/v8/JavaInstanceV8.h
+++ b/WebCore/bridge/jni/v8/JavaInstanceV8.h
@@ -1,19 +1,20 @@
 /*
+ * Copyright (C) 2003, 2008, 2010 Apple Inc. All rights reserved.
  * Copyright 2010, The Android Open Source Project
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 1. Redistributions of source code must retain the above copyright
+ *  * Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
+ *  * Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -26,7 +27,7 @@
 #ifndef JavaInstanceV8_h
 #define JavaInstanceV8_h
 
-#include "JNIUtilityPrivate.h"
+#include "npruntime.h"
 
 #include <JavaVM/jni.h>
 #include <wtf/RefCounted.h>
@@ -50,7 +51,7 @@
     void setInstance(jobject instance) { m_instance = instance; }
 
 protected:
-    JObjectWrapper(jobject instance);
+    JObjectWrapper(jobject);
     ~JObjectWrapper();
 
     void ref() { m_refCount++; }
diff --git a/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp b/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp
index 94c2198..808de03 100644
--- a/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp
+++ b/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009, The Android Open Source Project
+ * Copyright 2010, The Android Open Source Project
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -13,7 +13,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -27,7 +27,7 @@
 #include "config.h"
 #include "JavaNPObjectV8.h"
 
-#include "JNIUtility.h"
+#include "JNIUtilityPrivate.h"
 #include "JavaClassV8.h"
 #include "JavaInstanceV8.h"
 #include "npruntime_impl.h"
@@ -48,43 +48,43 @@
 static void FreeJavaNPObject(NPObject* npobj)
 {
     JavaNPObject* obj = reinterpret_cast<JavaNPObject*>(npobj);
-    obj->m_instance = 0;  // free does not call the destructor
+    obj->m_instance = 0; // free does not call the destructor
     free(obj);
 }
 
 static NPClass JavaNPObjectClass = {
     NP_CLASS_STRUCT_VERSION,
-    AllocJavaNPObject,  // allocate,
-    FreeJavaNPObject,  // free,
-    0,  // invalidate
-    JavaNPObject_HasMethod,
-    JavaNPObject_Invoke,
-    0,  // invokeDefault,
-    JavaNPObject_HasProperty,
-    JavaNPObject_GetProperty,
-    0,  // setProperty
-    0,  // removeProperty
-    0,  // enumerate
-    0   // construct
+    AllocJavaNPObject, // allocate,
+    FreeJavaNPObject, // free,
+    0, // invalidate
+    JavaNPObjectHasMethod,
+    JavaNPObjectInvoke,
+    0, // invokeDefault,
+    JavaNPObjectHasProperty,
+    JavaNPObjectGetProperty,
+    0, // setProperty
+    0, // removeProperty
+    0, // enumerate
+    0 // construct
 };
 
-
-NPObject* JavaInstanceToNPObject(JavaInstance* instance) {
+NPObject* JavaInstanceToNPObject(JavaInstance* instance)
+{
     JavaNPObject* object = reinterpret_cast<JavaNPObject*>(_NPN_CreateObject(0, &JavaNPObjectClass));
     object->m_instance = instance;
     return reinterpret_cast<NPObject*>(object);
 }
 
-
 // Returns null if obj is not a wrapper of JavaInstance
-JavaInstance* ExtractJavaInstance(NPObject* obj) {
-    if (obj->_class == &JavaNPObjectClass) {
+JavaInstance* ExtractJavaInstance(NPObject* obj)
+{
+    if (obj->_class == &JavaNPObjectClass)
         return reinterpret_cast<JavaNPObject*>(obj)->m_instance.get();
-    }
     return 0;
 }
 
-bool JavaNPObject_HasMethod(NPObject* obj, NPIdentifier identifier) {
+bool JavaNPObjectHasMethod(NPObject* obj, NPIdentifier identifier)
+{
     JavaInstance* instance = ExtractJavaInstance(obj);
     if (!instance)
         return false;
@@ -102,7 +102,8 @@
     return result;
 }
 
-bool JavaNPObject_Invoke(NPObject* obj, NPIdentifier identifier, const NPVariant* args, uint32_t argCount, NPVariant* result) {
+bool JavaNPObjectInvoke(NPObject* obj, NPIdentifier identifier, const NPVariant* args, uint32_t argCount, NPVariant* result)
+{
     JavaInstance* instance = ExtractJavaInstance(obj);
     if (!instance)
         return false;
@@ -119,7 +120,8 @@
     return r;
 }
 
-bool JavaNPObject_HasProperty(NPObject* obj, NPIdentifier identifier) {
+bool JavaNPObjectHasProperty(NPObject* obj, NPIdentifier identifier)
+{
     JavaInstance* instance = ExtractJavaInstance(obj);
     if (!instance)
         return false;
@@ -133,7 +135,8 @@
     return result;
 }
 
-bool JavaNPObject_GetProperty(NPObject* obj, NPIdentifier identifier, NPVariant* result) {
+bool JavaNPObjectGetProperty(NPObject* obj, NPIdentifier identifier, NPVariant* result)
+{
     VOID_TO_NPVARIANT(*result);
     JavaInstance* instance = ExtractJavaInstance(obj);
     if (!instance)
@@ -145,7 +148,7 @@
     instance->begin();
     JavaField* field = instance->getClass()->fieldNamed(name);
     instance->end();
-    free(name);  // TODO: use NPN_MemFree
+    free(name); // TODO: use NPN_MemFree
 
     if (!field)
         return false;
@@ -160,6 +163,6 @@
     return true;
 }
 
-}  // namespace Bindings
+} // namespace Bindings
 
-}  // namespace JSC
+} // namespace JSC
diff --git a/WebCore/bridge/jni/v8/JavaNPObjectV8.h b/WebCore/bridge/jni/v8/JavaNPObjectV8.h
index 89e2f3b..31b0ac7 100644
--- a/WebCore/bridge/jni/v8/JavaNPObjectV8.h
+++ b/WebCore/bridge/jni/v8/JavaNPObjectV8.h
@@ -13,7 +13,7 @@
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -26,9 +26,7 @@
 #ifndef JavaNPObjectV8_h
 #define JavaNPObjectV8_h
 
-#include "JNIBridge.h"
 #include "npruntime.h"
-#include <JavaVM/jni.h>
 #include <wtf/RefPtr.h>
 
 
@@ -46,10 +44,10 @@
 NPObject* JavaInstanceToNPObject(JavaInstance*);
 JavaInstance* ExtractJavaInstance(NPObject*);
 
-bool JavaNPObject_HasMethod(NPObject*, NPIdentifier name);
-bool JavaNPObject_Invoke(NPObject*, NPIdentifier methodName, const NPVariant* args, uint32_t argCount, NPVariant* result);
-bool JavaNPObject_HasProperty(NPObject*, NPIdentifier name);
-bool JavaNPObject_GetProperty(NPObject*, NPIdentifier name, NPVariant* result);
+bool JavaNPObjectHasMethod(NPObject*, NPIdentifier name);
+bool JavaNPObjectInvoke(NPObject*, NPIdentifier methodName, const NPVariant* args, uint32_t argCount, NPVariant* result);
+bool JavaNPObjectHasProperty(NPObject*, NPIdentifier name);
+bool JavaNPObjectGetProperty(NPObject*, NPIdentifier name, NPVariant* result);
 
 } // namespace Bindings
 
diff --git a/WebCore/bridge/jni/v8/JavaStringV8.h b/WebCore/bridge/jni/v8/JavaStringV8.h
index 8788e58..08d4b95 100644
--- a/WebCore/bridge/jni/v8/JavaStringV8.h
+++ b/WebCore/bridge/jni/v8/JavaStringV8.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Computer, Inc.  All rights reserved.
+ * Copyright 2010, The Android Open Source Project
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -42,9 +42,7 @@
     {
         int size = e->GetStringLength(s);
         const char* cs = getCharactersFromJStringInEnv(e, s);
-        {
-            m_utf8String = WebCore::CString(cs, size);
-        }
+        m_utf8String = WebCore::CString(cs, size);
         releaseCharactersForJStringInEnv(e, s, cs);
     }