diff options
| author | Steve Block <steveblock@google.com> | 2010-07-07 11:58:25 +0100 |
|---|---|---|
| committer | Steve Block <steveblock@google.com> | 2010-07-07 11:59:20 +0100 |
| commit | eddd844380db1ee6336d99a85ecae12db2b7599d (patch) | |
| tree | d82f540a48d05239194218731bbb5f93cb16a885 | |
| parent | 114830cf3874d82c64572150a188f6bbb3ea07de (diff) | |
| download | external_webkit-eddd844380db1ee6336d99a85ecae12db2b7599d.zip external_webkit-eddd844380db1ee6336d99a85ecae12db2b7599d.tar.gz external_webkit-eddd844380db1ee6336d99a85ecae12db2b7599d.tar.bz2 | |
Update JavaInstance to reflect final version upstreamed to WebKit
See https://bugs.webkit.org/show_bug.cgi?id=41516
Bug: 2807132
Change-Id: I080978d1a6b90f2d8da1f62adbb62c60ef0034c9
| -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); } |
