summaryrefslogtreecommitdiffstats
path: root/WebCore/bridge
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-03-08 18:13:21 +0000
committerSteve Block <steveblock@google.com>2010-03-09 13:44:55 +0000
commitb3a5456b19d07198898391407ed9576627fd3c02 (patch)
treed7b6b5962a8973166000316865850cfe0495eab8 /WebCore/bridge
parent1b727a2ea5efc5f80c5aca847d20ff671c2dcc44 (diff)
downloadexternal_webkit-b3a5456b19d07198898391407ed9576627fd3c02.zip
external_webkit-b3a5456b19d07198898391407ed9576627fd3c02.tar.gz
external_webkit-b3a5456b19d07198898391407ed9576627fd3c02.tar.bz2
Adds some logging to JObjectWrapper
This is an attempt to track down the cause of a crashing bug in the WebCore JSC bridge, which is only occasionaly triggered by the monkey. Bug: 2435360 Change-Id: I35069c2aff3d9cdf2cfd49264715c418911c9d9c
Diffstat (limited to 'WebCore/bridge')
-rw-r--r--WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
index b42456c..5980f0a 100644
--- a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
+++ b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
@@ -51,6 +51,9 @@
}
#endif
+#include <cutils/log.h>
+#define LOG_TAG JavaInstanceJSC.cpp
+
using namespace JSC::Bindings;
using namespace JSC;
@@ -324,6 +327,8 @@ JObjectWrapper::JObjectWrapper(jobject instance)
: m_refCount(0)
{
assert(instance);
+ if (!instance)
+ LOGE("Attempted to create JObjectWrapper for null object");
// Cache the JNIEnv used to get the global ref for this java instance.
// It'll be used to delete the reference.
@@ -334,7 +339,7 @@ JObjectWrapper::JObjectWrapper(jobject instance)
JS_LOG("new global ref %p for %p\n", m_instance, instance);
if (!m_instance)
- fprintf(stderr, "%s: could not get GlobalRef for %p\n", __PRETTY_FUNCTION__, instance);
+ LOGE("%s: could not get GlobalRef for %p\n", __PRETTY_FUNCTION__, instance);
}
JObjectWrapper::~JObjectWrapper()