diff options
-rw-r--r-- | WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp | 2 | ||||
-rw-r--r-- | WebCore/bridge/jni/v8/JavaInstanceV8.cpp | 15 |
2 files changed, 8 insertions, 9 deletions
diff --git a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp index 84b06de..2c9a4ad 100644 --- a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp +++ b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp @@ -43,8 +43,8 @@ #include <runtime/JSLock.h> #if PLATFORM(ANDROID) -#include <cutils/log.h> #define LOG_TAG JavaInstanceJSC.cpp +#include <utils/Log.h> #endif using namespace JSC::Bindings; diff --git a/WebCore/bridge/jni/v8/JavaInstanceV8.cpp b/WebCore/bridge/jni/v8/JavaInstanceV8.cpp index 59aa104..dd4750f 100644 --- a/WebCore/bridge/jni/v8/JavaInstanceV8.cpp +++ b/WebCore/bridge/jni/v8/JavaInstanceV8.cpp @@ -33,8 +33,10 @@ #include <assert.h> +// ANDROID #define LOG_TAG "v8binding" #include <utils/Log.h> +// END ANDROID using namespace JSC::Bindings; @@ -52,11 +54,13 @@ JavaInstance::~JavaInstance() #define NUM_LOCAL_REFS 64 -void JavaInstance::virtualBegin() { +void JavaInstance::virtualBegin() +{ getJNIEnv()->PushLocalFrame(NUM_LOCAL_REFS); } -void JavaInstance::virtualEnd() { +void JavaInstance::virtualEnd() +{ getJNIEnv()->PopLocalFrame(0); } @@ -89,10 +93,8 @@ bool JavaInstance::invokeMethod(const char* methodName, const NPVariant* args, i break; } } - if (!method) { - LOGW("unable to find an appropiate method\n"); + if (!method) return false; - } const JavaMethod* jMethod = static_cast<const JavaMethod*>(method); @@ -170,8 +172,6 @@ JObjectWrapper::JObjectWrapper(jobject instance) m_instance = m_env->NewGlobalRef(instance); - LOGV("new global ref %p for %p\n", m_instance, instance); - if (!m_instance) // ANDROID LOGE("%s: could not get GlobalRef for %p\n", __PRETTY_FUNCTION__, instance); @@ -180,6 +180,5 @@ JObjectWrapper::JObjectWrapper(jobject instance) JObjectWrapper::~JObjectWrapper() { - LOGV("deleting global ref %p\n", m_instance); m_env->DeleteGlobalRef(m_instance); } |