summaryrefslogtreecommitdiffstats
path: root/WebCore/bridge/jni/jni_class.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/bridge/jni/jni_class.cpp
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/bridge/jni/jni_class.cpp')
-rw-r--r--WebCore/bridge/jni/jni_class.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/WebCore/bridge/jni/jni_class.cpp b/WebCore/bridge/jni/jni_class.cpp
index 4140524..87750aa 100644
--- a/WebCore/bridge/jni/jni_class.cpp
+++ b/WebCore/bridge/jni/jni_class.cpp
@@ -29,7 +29,7 @@
#if ENABLE(MAC_JAVA_BRIDGE)
#include "JSDOMWindow.h"
-#include <kjs/identifier.h>
+#include <runtime/Identifier.h>
#include <runtime/JSLock.h>
#include "jni_utility.h"
#include "jni_runtime.h"
@@ -53,17 +53,15 @@ JavaClass::JavaClass(jobject anInstance)
int i;
JNIEnv *env = getJNIEnv();
- JSGlobalData* globalData = WebCore::JSDOMWindow::commonJSGlobalData();
-
// Get the fields
jarray fields = (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);
- Field *aField = new JavaField(env, aJField); // deleted in the JavaClass destructor
+ JavaField *aField = new JavaField(env, aJField); // deleted in the JavaClass destructor
{
JSLock lock(false);
- _fields.set(Identifier(globalData, UString(aField->name())).ustring().rep(), aField);
+ _fields.set(aField->name(), aField);
}
env->DeleteLocalRef(aJField);
}
@@ -73,15 +71,15 @@ JavaClass::JavaClass(jobject anInstance)
int numMethods = env->GetArrayLength(methods);
for (i = 0; i < numMethods; i++) {
jobject aJMethod = env->GetObjectArrayElement((jobjectArray)methods, i);
- Method *aMethod = new JavaMethod(env, aJMethod); // deleted in the JavaClass destructor
+ JavaMethod *aMethod = new JavaMethod(env, aJMethod); // deleted in the JavaClass destructor
MethodList* methodList;
{
JSLock lock(false);
- methodList = _methods.get(Identifier(globalData, UString(aMethod->name())).ustring().rep());
+ methodList = _methods.get(aMethod->name());
if (!methodList) {
methodList = new MethodList();
- _methods.set(Identifier(globalData, UString(aMethod->name())).ustring().rep(), methodList);
+ _methods.set(aMethod->name(), methodList);
}
}
methodList->append(aMethod);