From 1e67e45d20ead40b0407618abbc5e20840dc3c80 Mon Sep 17 00:00:00 2001 From: Grace Kloba Date: Mon, 28 Sep 2009 09:39:05 -0700 Subject: Update the comment for checking null in needtouchevents. Add the header in WebCoreJni.cpp so that LOGE will be print out. --- WebKit/android/jni/WebCoreJni.cpp | 1 + WebKit/android/jni/WebViewCore.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'WebKit') diff --git a/WebKit/android/jni/WebCoreJni.cpp b/WebKit/android/jni/WebCoreJni.cpp index b757e3a..e7088b2 100644 --- a/WebKit/android/jni/WebCoreJni.cpp +++ b/WebKit/android/jni/WebCoreJni.cpp @@ -26,6 +26,7 @@ #include "config.h" +#include "NotImplemented.h" #include "WebCoreJni.h" #include "jni_utility.h" #include diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 1cf96d5..359da03 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -904,8 +904,8 @@ void WebViewCore::needTouchEvents(bool need) #if ENABLE(TOUCH_EVENTS) // Android JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject obj = m_javaGlue->object(env); - // if this is called after DESTROY is handled in WebViewCore.java, mNativeClass - // will be null. Do nothing. + // if it is called during DESTROY is handled, the real object of WebViewCore + // can be gone. Check before using it. if (env && obj.get()) { env->CallVoidMethod(obj.get(), m_javaGlue->m_needTouchEvents, need); checkException(env); -- cgit v1.1