diff options
author | Steve Block <steveblock@google.com> | 2010-01-14 04:40:20 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-01-14 04:40:20 -0800 |
commit | 44364d809fca0d73d06341b521532e85c4c0168b (patch) | |
tree | 7b28dab31f2fe6ef3bd945b0d286eb46c5821a7e /WebCore | |
parent | a48cb1eae11a1592dfa6fbe6c33af1cec74a56b5 (diff) | |
parent | 76d21c39487c7753f1207935b120f3d4b06bae8d (diff) | |
download | external_webkit-44364d809fca0d73d06341b521532e85c4c0168b.zip external_webkit-44364d809fca0d73d06341b521532e85c4c0168b.tar.gz external_webkit-44364d809fca0d73d06341b521532e85c4c0168b.tar.bz2 |
Merge "Update jni_runtime.cpp with the latest changes to appendClassName." into eclair-mr2
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; |