[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:20:51 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b4ec4b16ec0beb91d059c7758184c6550bd1dc2a
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 5 17:44:58 2004 +0000
Added cache of JNI method IDs to minimize allocations. This mitigates the problem
described by 3515579.
Also cleanup up logging of Java exceptions.
Reviewed by John.
* bindings/jni/jni_class.cpp:
(JavaClass::classForInstance):
* bindings/jni/jni_instance.cpp:
(JavaInstance::JavaInstance):
(JavaInstance::getClass):
(JavaInstance::invokeMethod):
(JObjectWrapper::JObjectWrapper):
(JObjectWrapper::~JObjectWrapper):
* bindings/jni/jni_instance.h:
(KJS::Bindings::JavaInstance::operator=):
* bindings/jni/jni_runtime.cpp:
(JavaMethod::JavaMethod):
(JavaMethod::methodID):
* bindings/jni/jni_runtime.h:
(KJS::Bindings::JavaMethod::JavaMethod):
* bindings/jni/jni_utility.cpp:
(callJNIMethod):
(callJNIMethodIDA):
(callJNIMethodA):
(KJS::Bindings::getMethodID):
(KJS::Bindings::callJNIVoidMethodIDA):
(KJS::Bindings::callJNIObjectMethodIDA):
(KJS::Bindings::callJNIByteMethodIDA):
(KJS::Bindings::callJNICharMethodIDA):
(KJS::Bindings::callJNIShortMethodIDA):
(KJS::Bindings::callJNIIntMethodIDA):
(KJS::Bindings::callJNILongMethodIDA):
(KJS::Bindings::callJNIFloatMethodIDA):
(KJS::Bindings::callJNIDoubleMethodIDA):
(KJS::Bindings::callJNIBooleanMethodIDA):
(KJS::Bindings::getCharactersFromJStringInEnv):
(KJS::Bindings::getUCharactersFromJStringInEnv):
(KJS::Bindings::getJNIField):
* bindings/jni/jni_utility.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 7039a21..5a26a94 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,47 @@
+2004-01-05 Richard Williamson <rjw at apple.com>
+
+ Added cache of JNI method IDs to minimize allocations. This mitigates the problem
+ described by 3515579.
+
+ Also cleanup up logging of Java exceptions.
+
+ Reviewed by John.
+
+ * bindings/jni/jni_class.cpp:
+ (JavaClass::classForInstance):
+ * bindings/jni/jni_instance.cpp:
+ (JavaInstance::JavaInstance):
+ (JavaInstance::getClass):
+ (JavaInstance::invokeMethod):
+ (JObjectWrapper::JObjectWrapper):
+ (JObjectWrapper::~JObjectWrapper):
+ * bindings/jni/jni_instance.h:
+ (KJS::Bindings::JavaInstance::operator=):
+ * bindings/jni/jni_runtime.cpp:
+ (JavaMethod::JavaMethod):
+ (JavaMethod::methodID):
+ * bindings/jni/jni_runtime.h:
+ (KJS::Bindings::JavaMethod::JavaMethod):
+ * bindings/jni/jni_utility.cpp:
+ (callJNIMethod):
+ (callJNIMethodIDA):
+ (callJNIMethodA):
+ (KJS::Bindings::getMethodID):
+ (KJS::Bindings::callJNIVoidMethodIDA):
+ (KJS::Bindings::callJNIObjectMethodIDA):
+ (KJS::Bindings::callJNIByteMethodIDA):
+ (KJS::Bindings::callJNICharMethodIDA):
+ (KJS::Bindings::callJNIShortMethodIDA):
+ (KJS::Bindings::callJNIIntMethodIDA):
+ (KJS::Bindings::callJNILongMethodIDA):
+ (KJS::Bindings::callJNIFloatMethodIDA):
+ (KJS::Bindings::callJNIDoubleMethodIDA):
+ (KJS::Bindings::callJNIBooleanMethodIDA):
+ (KJS::Bindings::getCharactersFromJStringInEnv):
+ (KJS::Bindings::getUCharactersFromJStringInEnv):
+ (KJS::Bindings::getJNIField):
+ * bindings/jni/jni_utility.h:
+
l2003-12-23 John Sullivan <sullivan at apple.com>
* JavaScriptCore.pbproj/project.pbxproj:
diff --git a/JavaScriptCore/bindings/jni/jni_class.cpp b/JavaScriptCore/bindings/jni/jni_class.cpp
index b5b6413..3b31771 100644
--- a/JavaScriptCore/bindings/jni/jni_class.cpp
+++ b/JavaScriptCore/bindings/jni/jni_class.cpp
@@ -125,6 +125,12 @@ JavaClass *JavaClass::classForInstance (jobject instance)
_createClassesByNameIfNecessary();
jobject classOfInstance = callJNIObjectMethod(instance, "getClass", "()Ljava/lang/Class;");
+
+ if (!classOfInstance) {
+ fprintf (stderr, "%s: unable to call getClass on instance %p\n", __PRETTY_FUNCTION__, instance);
+ return 0;
+ }
+
jstring className = (jstring)callJNIObjectMethod(classOfInstance, "getName", "()Ljava/lang/String;");
const char *classNameC = getCharactersFromJString (className);
diff --git a/JavaScriptCore/bindings/jni/jni_instance.cpp b/JavaScriptCore/bindings/jni/jni_instance.cpp
index fb52d5c..ea13d9a 100644
--- a/JavaScriptCore/bindings/jni/jni_instance.cpp
+++ b/JavaScriptCore/bindings/jni/jni_instance.cpp
@@ -32,7 +32,7 @@
#define JS_LOG(formatAndArgs...) ((void)0)
#else
#define JS_LOG(formatAndArgs...) { \
- fprintf (stderr, "%s: ", __PRETTY_FUNCTION__); \
+ fprintf (stderr, "%s:%d -- %s: ", __FILE__, __LINE__, __FUNCTION__); \
fprintf(stderr, formatAndArgs); \
}
#endif
@@ -43,6 +43,7 @@ using namespace KJS;
JavaInstance::JavaInstance (jobject instance)
{
_instance = new JObjectWrapper (instance);
+ _class = 0;
};
JavaInstance::~JavaInstance ()
@@ -55,11 +56,15 @@ JavaInstance::JavaInstance (const JavaInstance &other) : Instance()
{
_instance = other._instance;
_instance->ref();
+ // Classes are kept around forever.
+ _class = other._class;
};
Class *JavaInstance::getClass() const
{
- return JavaClass::classForInstance (_instance->_instance);
+ if (_class == 0)
+ _class = JavaClass::classForInstance (_instance->_instance);
+ return _class;
}
KJS::Value JavaInstance::stringValue() const
@@ -93,7 +98,7 @@ Value JavaInstance::invokeMethod (KJS::ExecState *exec, const Method *method, co
jvalue *jArgs;
Value resultValue;
- JS_LOG ("%s\n", method->name());
+ JS_LOG ("call %s on %p\n", method->name(), _instance->_instance);
if (count > 0) {
jArgs = (jvalue *)malloc (count * sizeof(jvalue));
@@ -107,15 +112,16 @@ Value JavaInstance::invokeMethod (KJS::ExecState *exec, const Method *method, co
}
jvalue result;
+ jobject obj = _instance->_instance;
switch (jMethod->JNIReturnType()){
case void_type: {
- callJNIVoidMethodA (_instance->_instance, method->name(), jMethod->signature(), jArgs);
+ callJNIVoidMethodIDA (obj, jMethod->methodID(obj), jArgs);
resultValue = Undefined();
}
break;
case object_type: {
- result.l = callJNIObjectMethodA (_instance->_instance, method->name(), jMethod->signature(), jArgs);
+ result.l = callJNIObjectMethodIDA (obj, jMethod->methodID(obj), jArgs);
if (result.l != 0) {
resultValue = Object(new RuntimeObjectImp(new JavaInstance (result.l)));
}
@@ -126,49 +132,49 @@ Value JavaInstance::invokeMethod (KJS::ExecState *exec, const Method *method, co
break;
case boolean_type: {
- result.z = callJNIBooleanMethodA (_instance->_instance, method->name(), jMethod->signature(), jArgs);
+ result.z = callJNIBooleanMethodIDA (obj, jMethod->methodID(obj), jArgs);
resultValue = KJS::Boolean(result.z);
}
break;
case byte_type: {
- result.b = callJNIByteMethodA (_instance->_instance, method->name(), jMethod->signature(), jArgs);
+ result.b = callJNIByteMethodIDA (obj, jMethod->methodID(obj), jArgs);
resultValue = Number(result.b);
}
break;
case char_type: {
- result.c = callJNICharMethodA (_instance->_instance, method->name(), jMethod->signature(), jArgs);
+ result.c = callJNICharMethodIDA (obj, jMethod->methodID(obj), jArgs);
resultValue = Number(result.c);
}
break;
case short_type: {
- result.s = callJNIShortMethodA (_instance->_instance, method->name(), jMethod->signature(), jArgs);
+ result.s = callJNIShortMethodIDA (obj, jMethod->methodID(obj), jArgs);
resultValue = Number(result.s);
}
break;
case int_type: {
- result.i = callJNIIntMethodA (_instance->_instance, method->name(), jMethod->signature(), jArgs);
+ result.i = callJNIIntMethodIDA (obj, jMethod->methodID(obj), jArgs);
resultValue = Number(result.i);
}
break;
case long_type: {
- result.j = callJNILongMethodA (_instance->_instance, method->name(), jMethod->signature(), jArgs);
+ result.j = callJNILongMethodIDA (obj, jMethod->methodID(obj), jArgs);
resultValue = Number((long int)result.j);
}
break;
case float_type: {
- result.f = callJNIFloatMethodA (_instance->_instance, method->name(), jMethod->signature(), jArgs);
+ result.f = callJNIFloatMethodIDA (obj, jMethod->methodID(obj), jArgs);
resultValue = Number(result.f);
}
break;
case double_type: {
- result.d = callJNIDoubleMethodA (_instance->_instance, method->name(), jMethod->signature(), jArgs);
+ result.d = callJNIDoubleMethodIDA (obj, jMethod->methodID(obj), jArgs);
resultValue = Number(result.d);
}
break;
@@ -230,7 +236,14 @@ JObjectWrapper::JObjectWrapper(jobject instance)
_instance = _env->NewGlobalRef (instance);
_env->DeleteLocalRef (instance);
+ JS_LOG ("new global ref %p for %p\n", _instance, instance);
+
if (_instance == NULL) {
fprintf (stderr, "%s: could not get GlobalRef for %p\n", __PRETTY_FUNCTION__, instance);
}
}
+
+JObjectWrapper::~JObjectWrapper() {
+ JS_LOG ("deleting global ref %p\n", _instance);
+ _env->DeleteGlobalRef (_instance);
+}
diff --git a/JavaScriptCore/bindings/jni/jni_instance.h b/JavaScriptCore/bindings/jni/jni_instance.h
index 8108a63..c6edfff 100644
--- a/JavaScriptCore/bindings/jni/jni_instance.h
+++ b/JavaScriptCore/bindings/jni/jni_instance.h
@@ -52,10 +52,8 @@ protected:
delete this;
}
- ~JObjectWrapper() {
- _env->DeleteGlobalRef (_instance);
- }
-
+ ~JObjectWrapper();
+
jobject _instance;
private:
@@ -82,6 +80,9 @@ public:
_instance = other._instance;
_instance->ref();
_oldInstance->deref();
+
+ // Classes are kept around forever.
+ _class = other._class;
return *this;
};
@@ -99,6 +100,7 @@ public:
private:
JObjectWrapper *_instance;
+ mutable JavaClass *_class;
};
} // namespace Bindings
diff --git a/JavaScriptCore/bindings/jni/jni_runtime.cpp b/JavaScriptCore/bindings/jni/jni_runtime.cpp
index a8a52bd..733bcb0 100644
--- a/JavaScriptCore/bindings/jni/jni_runtime.cpp
+++ b/JavaScriptCore/bindings/jni/jni_runtime.cpp
@@ -210,9 +210,9 @@ JavaMethod::JavaMethod (JNIEnv *env, jobject aMethod)
_parameters[i] = JavaParameter(env, parameterName);
}
-
// Created lazily.
_signature = 0;
+ _methodID = 0;
}
// JNI method signatures use '/' between components of a class name, but
@@ -265,6 +265,15 @@ JNIType JavaMethod::JNIReturnType() const
return _JNIReturnType;
}
+jmethodID JavaMethod::methodID (jobject obj) const
+{
+ if (_methodID == 0) {
+ _methodID = getMethodID (obj, name(), signature());
+ }
+ return _methodID;
+}
+
+
JavaArray::JavaArray (jobject a, const char *t)
{
_array = new JObjectWrapper (a);
diff --git a/JavaScriptCore/bindings/jni/jni_runtime.h b/JavaScriptCore/bindings/jni/jni_runtime.h
index a266f85..09d2271 100644
--- a/JavaScriptCore/bindings/jni/jni_runtime.h
+++ b/JavaScriptCore/bindings/jni/jni_runtime.h
@@ -240,7 +240,7 @@ private:
class JavaMethod : public Method
{
public:
- JavaMethod() : Method(), _signature(0) {};
+ JavaMethod() : Method(), _signature(0), _methodID(0) {};
JavaMethod (JNIEnv *env, jobject aMethod);
@@ -289,7 +289,9 @@ public:
const char *signature() const;
JNIType JNIReturnType() const;
-
+
+ jmethodID methodID (jobject obj) const;
+
private:
JavaParameter *_parameters;
long _numParameters;
@@ -297,6 +299,7 @@ private:
mutable KJS::UString *_signature;
JavaString _returnType;
JNIType _JNIReturnType;
+ mutable jmethodID _methodID;
};
class JavaArray : public Array
diff --git a/JavaScriptCore/bindings/jni/jni_utility.cpp b/JavaScriptCore/bindings/jni/jni_utility.cpp
index 3ef01f1..d4cdddc 100644
--- a/JavaScriptCore/bindings/jni/jni_utility.cpp
+++ b/JavaScriptCore/bindings/jni/jni_utility.cpp
@@ -68,7 +68,7 @@ JNIEnv *KJS::Bindings::getJNIEnv()
return NULL;
}
-static jvalue callJNIMethod( JNIType type, jobject obj, const char *name, const char *sig, va_list args)
+static jvalue callJNIMethod (JNIType type, jobject obj, const char *name, const char *sig, va_list args)
{
JavaVM *jvm = getJavaVM();
JNIEnv *env = getJNIEnv();
@@ -118,22 +118,70 @@ static jvalue callJNIMethod( JNIType type, jobject obj, const char *name, const
}
else
{
- fprintf(stderr, "%s: Could not find method: %s\n", __PRETTY_FUNCTION__, name);
+ fprintf(stderr, "%s: Could not find method: %s for %p\n", __PRETTY_FUNCTION__, name, obj);
env->ExceptionDescribe();
env->ExceptionClear();
+ fprintf (stderr, "\n");
}
env->DeleteLocalRef(cls);
}
else {
- fprintf(stderr, "%s: Could not find class for object\n", __PRETTY_FUNCTION__);
+ fprintf(stderr, "%s: Could not find class for %p\n", __PRETTY_FUNCTION__, obj);
}
}
return result;
}
-static jvalue callJNIMethodA( JNIType type, jobject obj, const char *name, const char *sig, jvalue *args)
+static jvalue callJNIMethodIDA (JNIType type, jobject obj, jmethodID mid, jvalue *args)
+{
+ JNIEnv *env = getJNIEnv();
+ jvalue result;
+
+ bzero (&result, sizeof(jvalue));
+ if ( obj != NULL && mid != NULL )
+ {
+ switch (type) {
+ case void_type:
+ env->functions->CallVoidMethodA(env, obj, mid, args);
+ break;
+ case object_type:
+ result.l = env->functions->CallObjectMethodA(env, obj, mid, args);
+ break;
+ case boolean_type:
+ result.z = env->functions->CallBooleanMethodA(env, obj, mid, args);
+ break;
+ case byte_type:
+ result.b = env->functions->CallByteMethodA(env, obj, mid, args);
+ break;
+ case char_type:
+ result.c = env->functions->CallCharMethodA(env, obj, mid, args);
+ break;
+ case short_type:
+ result.s = env->functions->CallShortMethodA(env, obj, mid, args);
+ break;
+ case int_type:
+ result.i = env->functions->CallIntMethodA(env, obj, mid, args);
+ break;
+ case long_type:
+ result.j = env->functions->CallLongMethodA(env, obj, mid, args);
+ break;
+ case float_type:
+ result.f = env->functions->CallFloatMethodA(env, obj, mid, args);
+ break;
+ case double_type:
+ result.d = env->functions->CallDoubleMethodA(env, obj, mid, args);
+ break;
+ default:
+ fprintf(stderr, "%s: invalid function type (%d)\n", __PRETTY_FUNCTION__, (int)type);
+ }
+ }
+
+ return result;
+}
+
+static jvalue callJNIMethodA (JNIType type, jobject obj, const char *name, const char *sig, jvalue *args)
{
JavaVM *jvm = getJavaVM();
JNIEnv *env = getJNIEnv();
@@ -144,48 +192,14 @@ static jvalue callJNIMethodA( JNIType type, jobject obj, const char *name, const
jclass cls = env->GetObjectClass(obj);
if ( cls != NULL ) {
jmethodID mid = env->GetMethodID(cls, name, sig);
- if ( mid != NULL )
- {
- switch (type) {
- case void_type:
- env->functions->CallVoidMethodA(env, obj, mid, args);
- break;
- case object_type:
- result.l = env->functions->CallObjectMethodA(env, obj, mid, args);
- break;
- case boolean_type:
- result.z = env->functions->CallBooleanMethodA(env, obj, mid, args);
- break;
- case byte_type:
- result.b = env->functions->CallByteMethodA(env, obj, mid, args);
- break;
- case char_type:
- result.c = env->functions->CallCharMethodA(env, obj, mid, args);
- break;
- case short_type:
- result.s = env->functions->CallShortMethodA(env, obj, mid, args);
- break;
- case int_type:
- result.i = env->functions->CallIntMethodA(env, obj, mid, args);
- break;
- case long_type:
- result.j = env->functions->CallLongMethodA(env, obj, mid, args);
- break;
- case float_type:
- result.f = env->functions->CallFloatMethodA(env, obj, mid, args);
- break;
- case double_type:
- result.d = env->functions->CallDoubleMethodA(env, obj, mid, args);
- break;
- default:
- fprintf(stderr, "%s: invalid function type (%d)\n", __PRETTY_FUNCTION__, (int)type);
- }
+ if ( mid != NULL ) {
+ result = callJNIMethodIDA (type, obj, mid, args);
}
- else
- {
+ else {
fprintf(stderr, "%s: Could not find method: %s\n", __PRETTY_FUNCTION__, name);
env->ExceptionDescribe();
env->ExceptionClear();
+ fprintf (stderr, "\n");
}
env->DeleteLocalRef(cls);
@@ -198,6 +212,22 @@ static jvalue callJNIMethodA( JNIType type, jobject obj, const char *name, const
return result;
}
+jmethodID KJS::Bindings::getMethodID (jobject obj, const char *name, const char *sig)
+{
+ JNIEnv *env = getJNIEnv();
+ jmethodID mid = 0;
+
+ if ( env != NULL) {
+ jclass cls = env->GetObjectClass(obj);
+ if ( cls != NULL ) {
+ mid = env->GetMethodID(cls, name, sig);
+ }
+ env->DeleteLocalRef(cls);
+ }
+ return mid;
+}
+
+
#define CALL_JNI_METHOD(function_type,obj,name,sig) \
va_list args;\
va_start (args, sig);\
@@ -324,6 +354,65 @@ jboolean KJS::Bindings::callJNIBooleanMethodA (jobject obj, const char *name, co
return result.z;
}
+void KJS::Bindings::callJNIVoidMethodIDA (jobject obj, jmethodID methodID, jvalue *args)
+{
+ jvalue result = callJNIMethodIDA (void_type, obj, methodID, args);
+}
+
+jobject KJS::Bindings::callJNIObjectMethodIDA (jobject obj, jmethodID methodID, jvalue *args)
+{
+ jvalue result = callJNIMethodIDA (object_type, obj, methodID, args);
+ return result.l;
+}
+
+jbyte KJS::Bindings::callJNIByteMethodIDA ( jobject obj, jmethodID methodID, jvalue *args)
+{
+ jvalue result = callJNIMethodIDA (byte_type, obj, methodID, args);
+ return result.b;
+}
+
+jchar KJS::Bindings::callJNICharMethodIDA (jobject obj, jmethodID methodID, jvalue *args)
+{
+ jvalue result = callJNIMethodIDA (char_type, obj, methodID, args);
+ return result.c;
+}
+
+jshort KJS::Bindings::callJNIShortMethodIDA (jobject obj, jmethodID methodID, jvalue *args)
+{
+ jvalue result = callJNIMethodIDA (short_type, obj, methodID, args);
+ return result.s;
+}
+
+jint KJS::Bindings::callJNIIntMethodIDA (jobject obj, jmethodID methodID, jvalue *args)
+{
+ jvalue result = callJNIMethodIDA (int_type, obj, methodID, args);
+ return result.i;
+}
+
+jlong KJS::Bindings::callJNILongMethodIDA (jobject obj, jmethodID methodID, jvalue *args)
+{
+ jvalue result = callJNIMethodIDA (long_type, obj, methodID, args);
+ return result.j;
+}
+
+jfloat KJS::Bindings::callJNIFloatMethodIDA (jobject obj, jmethodID methodID, jvalue *args)
+{
+ jvalue result = callJNIMethodIDA (float_type, obj, methodID, args);
+ return result.f;
+}
+
+jdouble KJS::Bindings::callJNIDoubleMethodIDA (jobject obj, jmethodID methodID, jvalue *args)
+{
+ jvalue result = callJNIMethodIDA (double_type, obj, methodID, args);
+ return result.d;
+}
+
+jboolean KJS::Bindings::callJNIBooleanMethodIDA (jobject obj, jmethodID methodID, jvalue *args)
+{
+ jvalue result = callJNIMethodIDA (boolean_type, obj, methodID, args);
+ return result.z;
+}
+
const char *KJS::Bindings::getCharactersFromJString (jstring aJString)
{
return getCharactersFromJStringInEnv (getJNIEnv(), aJString);
@@ -341,6 +430,7 @@ const char *KJS::Bindings::getCharactersFromJStringInEnv (JNIEnv *env, jstring a
if (!s) {
env->ExceptionDescribe();
env->ExceptionClear();
+ fprintf (stderr, "\n");
}
return s;
}
@@ -357,6 +447,7 @@ const jchar *KJS::Bindings::getUCharactersFromJStringInEnv (JNIEnv *env, jstring
if (!s) {
env->ExceptionDescribe();
env->ExceptionClear();
+ fprintf (stderr, "\n");
}
return s;
}
@@ -523,6 +614,7 @@ jvalue KJS::Bindings::getJNIField( jobject obj, JNIType type, const char *name,
fprintf(stderr, "%s: Could not find field: %s\n", __PRETTY_FUNCTION__, name);
env->ExceptionDescribe();
env->ExceptionClear();
+ fprintf (stderr, "\n");
}
env->DeleteLocalRef(cls);
diff --git a/JavaScriptCore/bindings/jni/jni_utility.h b/JavaScriptCore/bindings/jni/jni_utility.h
index 8dd0947..a1c6abb 100644
--- a/JavaScriptCore/bindings/jni/jni_utility.h
+++ b/JavaScriptCore/bindings/jni/jni_utility.h
@@ -65,29 +65,42 @@ const char *signatureFromPrimitiveType(JNIType type);
jvalue convertValueToJValue (KJS::ExecState *exec, KJS::Value value, JNIType _JNIType, const char *javaClassName);
-jvalue getJNIField( jobject obj, JNIType type, const char *name, const char *signature);
-
-jobject callJNIObjectMethod( jobject obj, const char *name, const char *sig, ... );
-void callJNIVoidMethod( jobject obj, const char *name, const char *sig, ... );
-jboolean callJNIBooleanMethod( jobject obj, const char *name, const char *sig, ... );
-jbyte callJNIByteMethod( jobject obj, const char *name, const char *sig, ... );
-jchar callJNICharMethod( jobject obj, const char *name, const char *sig, ... );
-jshort callJNIShortMethod( jobject obj, const char *name, const char *sig, ... );
-jint callJNIIntMethod( jobject obj, const char *name, const char *sig, ... );
-jlong callJNILongMethod( jobject obj, const char *name, const char *sig, ... );
-jfloat callJNIFloatMethod( jobject obj, const char *name, const char *sig, ... );
-jdouble callJNIDoubleMethod( jobject obj, const char *name, const char *sig, ... );
-
-jobject callJNIObjectMethodA( jobject obj, const char *name, const char *sig, jvalue *args);
-void callJNIVoidMethodA( jobject obj, const char *name, const char *sig, jvalue *args);
-jboolean callJNIBooleanMethodA( jobject obj, const char *name, const char *sig, jvalue *args);
-jbyte callJNIByteMethodA( jobject obj, const char *name, const char *sig, jvalue *args);
-jchar callJNICharMethodA( jobject obj, const char *name, const char *sig, jvalue *args);
-jshort callJNIShortMethodA( jobject obj, const char *name, const char *sig, jvalue *args);
-jint callJNIIntMethodA( jobject obj, const char *name, const char *sig, jvalue *args);
-jlong callJNILongMethodA( jobject obj, const char *name, const char *sig, jvalue *args);
-jfloat callJNIFloatMethodA( jobject obj, const char *name, const char *sig, jvalue *args);
-jdouble callJNIDoubleMethodA( jobject obj, const char *name, const char *sig, jvalue *args);
+jvalue getJNIField (jobject obj, JNIType type, const char *name, const char *signature);
+
+jmethodID getMethodID (jobject obj, const char *name, const char *sig);
+
+jobject callJNIObjectMethod (jobject obj, const char *name, const char *sig, ... );
+void callJNIVoidMethod (jobject obj, const char *name, const char *sig, ... );
+jboolean callJNIBooleanMethod (jobject obj, const char *name, const char *sig, ... );
+jbyte callJNIByteMethod (jobject obj, const char *name, const char *sig, ... );
+jchar callJNICharMethod (jobject obj, const char *name, const char *sig, ... );
+jshort callJNIShortMethod (jobject obj, const char *name, const char *sig, ... );
+jint callJNIIntMethod (jobject obj, const char *name, const char *sig, ... );
+jlong callJNILongMethod (jobject obj, const char *name, const char *sig, ... );
+jfloat callJNIFloatMethod (jobject obj, const char *name, const char *sig, ... );
+jdouble callJNIDoubleMethod (jobject obj, const char *name, const char *sig, ... );
+
+jobject callJNIObjectMethodA (jobject obj, const char *name, const char *sig, jvalue *args);
+void callJNIVoidMethodA (jobject obj, const char *name, const char *sig, jvalue *args);
+jboolean callJNIBooleanMethodA (jobject obj, const char *name, const char *sig, jvalue *args);
+jbyte callJNIByteMethodA (jobject obj, const char *name, const char *sig, jvalue *args);
+jchar callJNICharMethodA (jobject obj, const char *name, const char *sig, jvalue *args);
+jshort callJNIShortMethodA (jobject obj, const char *name, const char *sig, jvalue *args);
+jint callJNIIntMethodA (jobject obj, const char *name, const char *sig, jvalue *args);
+jlong callJNILongMethodA (jobject obj, const char *name, const char *sig, jvalue *args);
+jfloat callJNIFloatMethodA (jobject obj, const char *name, const char *sig, jvalue *args);
+jdouble callJNIDoubleMethodA (jobject obj, const char *name, const char *sig, jvalue *args);
+
+jobject callJNIObjectMethodIDA (jobject obj, jmethodID methodID, jvalue *args);
+void callJNIVoidMethodIDA (jobject obj, jmethodID methodID, jvalue *args);
+jboolean callJNIBooleanMethodIDA (jobject obj, jmethodID methodID, jvalue *args);
+jbyte callJNIByteMethodIDA (jobject obj, jmethodID methodID, jvalue *args);
+jchar callJNICharMethodIDA (jobject obj, jmethodID methodID, jvalue *args);
+jshort callJNIShortMethodIDA (jobject obj, jmethodID methodID, jvalue *args);
+jint callJNIIntMethodIDA (jobject obj, jmethodID methodID, jvalue *args);
+jlong callJNILongMethodIDA (jobject obj, jmethodID methodID, jvalue *args);
+jfloat callJNIFloatMethodIDA (jobject obj, jmethodID methodID, jvalue *args);
+jdouble callJNIDoubleMethodIDA (jobject obj, jmethodID methodID, jvalue *args);
JavaVM *getJavaVM();
JNIEnv *getJNIEnv();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list