Title: [91260] trunk/Source/WebCore
Revision
91260
Author
[email protected]
Date
2011-07-19 08:56:57 -0700 (Tue, 19 Jul 2011)

Log Message

REGRESSION (r82194): jvalueToJavaValue() does not correctly set length of String property
https://bugs.webkit.org/show_bug.cgi?id=64730

Reviewed by Alexey Proskuryakov.

Covered by existing tests.

* bridge/jni/v8/JNIUtilityPrivate.cpp:
(JSC::Bindings::jvalueToJavaValue):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (91259 => 91260)


--- trunk/Source/WebCore/ChangeLog	2011-07-19 15:55:44 UTC (rev 91259)
+++ trunk/Source/WebCore/ChangeLog	2011-07-19 15:56:57 UTC (rev 91260)
@@ -1,3 +1,15 @@
+2011-07-19  Steve Block  <[email protected]>
+
+        REGRESSION (r82194): jvalueToJavaValue() does not correctly set length of String property
+        https://bugs.webkit.org/show_bug.cgi?id=64730
+
+        Reviewed by Alexey Proskuryakov.
+
+        Covered by existing tests.
+
+        * bridge/jni/v8/JNIUtilityPrivate.cpp:
+        (JSC::Bindings::jvalueToJavaValue):
+
 2011-07-19  Vitaly Repeshko  <[email protected]>
 
         [V8] Don't put CSSRuleLists in object groups.

Modified: trunk/Source/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp (91259 => 91260)


--- trunk/Source/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp	2011-07-19 15:55:44 UTC (rev 91259)
+++ trunk/Source/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp	2011-07-19 15:56:57 UTC (rev 91260)
@@ -247,10 +247,10 @@
     case JavaTypeString:
         {
             jstring javaString = static_cast<jstring>(value.l);
-            const UChar* a = getUCharactersFromJStringInEnv(getJNIEnv(), javaString);
+            const UChar* characters = getUCharactersFromJStringInEnv(getJNIEnv(), javaString);
             // We take a copy to allow the Java String to be released.
-            result.m_stringValue = String(a).threadsafeCopy();
-            releaseUCharactersForJStringInEnv(getJNIEnv(), javaString, a);
+            result.m_stringValue = String(characters, getJNIEnv()->GetStringLength(javaString));
+            releaseUCharactersForJStringInEnv(getJNIEnv(), javaString, characters);
         }
         break;
     case JavaTypeBoolean:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to