summaryrefslogtreecommitdiffstats
path: root/WebCore/bridge/jni
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bridge/jni')
-rw-r--r--WebCore/bridge/jni/jni_jsobject.mm8
-rw-r--r--WebCore/bridge/jni/jni_utility.cpp5
-rw-r--r--WebCore/bridge/jni/jni_utility.h11
3 files changed, 18 insertions, 6 deletions
diff --git a/WebCore/bridge/jni/jni_jsobject.mm b/WebCore/bridge/jni/jni_jsobject.mm
index 301d672..3689840 100644
--- a/WebCore/bridge/jni/jni_jsobject.mm
+++ b/WebCore/bridge/jni/jni_jsobject.mm
@@ -302,9 +302,9 @@ jobject JavaJSObject::call(jstring methodName, jobjectArray args) const
// Call the function object.
ArgList argList;
getListFromJArray(exec, args, argList);
- rootObject->globalObject()->startTimeoutCheck();
+ rootObject->globalObject()->globalData()->timeoutChecker.start();
JSValuePtr result = JSC::call(exec, function, callType, callData, _imp, argList);
- rootObject->globalObject()->stopTimeoutCheck();
+ rootObject->globalObject()->globalData()->timeoutChecker.stop();
return convertValueToJObject(result);
}
@@ -321,9 +321,9 @@ jobject JavaJSObject::eval(jstring script) const
if (!rootObject)
return 0;
- rootObject->globalObject()->startTimeoutCheck();
+ rootObject->globalObject()->globalData()->timeoutChecker.start();
Completion completion = JSC::evaluate(rootObject->globalObject()->globalExec(), rootObject->globalObject()->globalScopeChain(), makeSource(JavaString(script)));
- rootObject->globalObject()->stopTimeoutCheck();
+ rootObject->globalObject()->globalData()->timeoutChecker.stop();
ComplType type = completion.complType();
if (type == Normal) {
diff --git a/WebCore/bridge/jni/jni_utility.cpp b/WebCore/bridge/jni/jni_utility.cpp
index 5dc4722..a1f4a2d 100644
--- a/WebCore/bridge/jni/jni_utility.cpp
+++ b/WebCore/bridge/jni/jni_utility.cpp
@@ -28,11 +28,14 @@
#if ENABLE(MAC_JAVA_BRIDGE)
+#if USE(JSC)
#include "jni_runtime.h"
#include "runtime_array.h"
#include "runtime_object.h"
#include <runtime/JSArray.h>
#include <runtime/JSLock.h>
+#endif
+
#include <dlfcn.h>
namespace JSC {
@@ -347,6 +350,7 @@ jvalue getJNIField( jobject obj, JNIType type, const char *name, const char *sig
return result;
}
+#if USE(JSC)
static jobject convertArrayInstanceToJavaArray(ExecState* exec, JSArray* jsArray, const char* javaClassName)
{
JNIEnv *env = getJNIEnv();
@@ -576,6 +580,7 @@ jvalue convertValueToJValue(ExecState* exec, JSValuePtr value, JNIType _JNIType,
}
return result;
}
+#endif // USE(JSC)
} // end of namespace Bindings
diff --git a/WebCore/bridge/jni/jni_utility.h b/WebCore/bridge/jni/jni_utility.h
index e76570c..4330b1e 100644
--- a/WebCore/bridge/jni/jni_utility.h
+++ b/WebCore/bridge/jni/jni_utility.h
@@ -28,7 +28,9 @@
#if ENABLE(MAC_JAVA_BRIDGE)
+#if USE(JSC)
#include <runtime/JSValue.h>
+#endif
#include <JavaVM/jni.h>
// The order of these items can not be modified as they are tightly
@@ -53,8 +55,10 @@ typedef enum {
namespace JSC {
+#if USE(JSC)
class ExecState;
class JSObject;
+#endif
namespace Bindings {
@@ -72,7 +76,9 @@ JNIType JNITypeFromClassName(const char *name);
JNIType JNITypeFromPrimitiveType(char type);
const char *signatureFromPrimitiveType(JNIType type);
+#if USE(JSC)
jvalue convertValueToJValue(ExecState*, JSValuePtr, JNIType, const char* javaClassName);
+#endif
jvalue getJNIField(jobject obj, JNIType type, const char *name, const char *signature);
@@ -279,9 +285,10 @@ T callJNIStaticMethod(jclass cls, const char* methodName, const char* methodSign
return result;
}
-
-bool dispatchJNICall(ExecState*, const void* targetAppletView, jobject obj, bool isStatic, JNIType returnType, jmethodID methodID, jvalue* args, jvalue& result, const char* callingURL, JSValuePtr& exceptionDescription);
+#if USE(JSC)
+bool dispatchJNICall(ExecState*, const void* targetAppletView, jobject obj, bool isStatic, JNIType returnType, jmethodID methodID, jvalue* args, jvalue& result, const char* callingURL, JSValuePtr& exceptionDescription);
+#endif
} // namespace Bindings
} // namespace JSC