diff options
author | Steve Block <steveblock@google.com> | 2010-01-14 05:12:13 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-01-14 05:12:13 -0800 |
commit | 54432b29eb93b7be82c6306805f07b06ca9311b6 (patch) | |
tree | 1dada04f6672bdfa2f9ba8c9f670122ac54bfd22 /WebCore | |
parent | 7a2be7bd65844c55902e0368171e6115fce4d31f (diff) | |
parent | 594a347941318556ae40d521e6f5c23fd9cf66b4 (diff) | |
download | external_webkit-54432b29eb93b7be82c6306805f07b06ca9311b6.zip external_webkit-54432b29eb93b7be82c6306805f07b06ca9311b6.tar.gz external_webkit-54432b29eb93b7be82c6306805f07b06ca9311b6.tar.bz2 |
am 594a3479: am 44364d80: Merge "Update jni_runtime.cpp with the latest changes to appendClassName." into eclair-mr2
Merge commit '594a347941318556ae40d521e6f5c23fd9cf66b4'
* commit '594a347941318556ae40d521e6f5c23fd9cf66b4':
Update jni_runtime.cpp with the latest changes to appendClassName.
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/bridge/jni/jni_runtime.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/WebCore/bridge/jni/jni_runtime.cpp b/WebCore/bridge/jni/jni_runtime.cpp index be11981..7f9fb72 100644 --- a/WebCore/bridge/jni/jni_runtime.cpp +++ b/WebCore/bridge/jni/jni_runtime.cpp @@ -28,6 +28,8 @@ #if ENABLE(MAC_JAVA_BRIDGE) +#include "CString.h" +#include "StringBuilder.h" #include "jni_utility.h" #include "jni_utility_private.h" #include "runtime_array.h" @@ -47,6 +49,7 @@ using namespace JSC; using namespace JSC::Bindings; +using namespace WebCore; JavaParameter::JavaParameter (JNIEnv *env, jstring type) @@ -296,7 +299,7 @@ JavaMethod::~JavaMethod() // JNI method signatures use '/' between components of a class name, but // we get '.' between components from the reflection API. -static void appendClassName(UString& aString, const char* className) +static void appendClassName(StringBuilder& builder, const char* className) { ASSERT(JSLock::lockCount() > 0); @@ -309,9 +312,9 @@ static void appendClassName(UString& aString, const char* className) cp++; } - aString.append(result); + builder.append(result); - free (result); + free(result); } const char *JavaMethod::signature() const @@ -319,7 +322,8 @@ const char *JavaMethod::signature() const if (!_signature) { JSLock lock(SilenceAssertionsOnly); - UString signatureBuilder("("); + StringBuilder signatureBuilder; + signatureBuilder.append("("); for (int i = 0; i < _numParameters; i++) { JavaParameter* aParameter = parameterAt(i); JNIType _JNIType = aParameter->getJNIType(); @@ -346,7 +350,8 @@ const char *JavaMethod::signature() const } } - _signature = strdup(signatureBuilder.ascii()); + String signatureString = signatureBuilder.toString(); + _signature = strdup(signatureString.utf8().data()); } return _signature; |