diff options
author | John Reck <jreck@google.com> | 2012-06-07 15:57:59 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-06-07 15:57:59 -0700 |
commit | 92d7c4c42a4d5e64592a6c52c0f6ad1500e20efa (patch) | |
tree | ce0adafc2b906170f921e754842128d9059f9b3c /Source/WebKit/android | |
parent | b44cdc90599330574434d176f04585506741f703 (diff) | |
parent | f8f128dcb4ac3fe0ec6d81d1dcd0b15eb2380f6a (diff) | |
download | external_webkit-92d7c4c42a4d5e64592a6c52c0f6ad1500e20efa.zip external_webkit-92d7c4c42a4d5e64592a6c52c0f6ad1500e20efa.tar.gz external_webkit-92d7c4c42a4d5e64592a6c52c0f6ad1500e20efa.tar.bz2 |
Merge "Switch stopGL and destroy to use a passed in ptr" into jb-dev
Diffstat (limited to 'Source/WebKit/android')
-rw-r--r-- | Source/WebKit/android/nav/WebView.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index a277fc3..38ba451 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -984,17 +984,18 @@ static void nativeSetHeightCanMeasure(JNIEnv *env, jobject obj, bool measure) view->setHeightCanMeasure(measure); } -static void nativeDestroy(JNIEnv *env, jobject obj) +static void nativeDestroy(JNIEnv *env, jobject obj, jint ptr) { - WebView* view = GET_NATIVE_VIEW(env, obj); + WebView* view = reinterpret_cast<WebView*>(ptr); ALOGD("nativeDestroy view: %p", view); ALOG_ASSERT(view, "view not set in nativeDestroy"); delete view; } -static void nativeStopGL(JNIEnv *env, jobject obj) +static void nativeStopGL(JNIEnv *env, jobject obj, jint ptr) { - GET_NATIVE_VIEW(env, obj)->stopGL(); + if (ptr) + reinterpret_cast<WebView*>(ptr)->stopGL(); } static jobject nativeGetSelection(JNIEnv *env, jobject obj) @@ -1293,7 +1294,7 @@ static void nativeFindMaxVisibleRect(JNIEnv *env, jobject obj, jint nativeView, static JNINativeMethod gJavaWebViewMethods[] = { { "nativeCreate", "(ILjava/lang/String;Z)V", (void*) nativeCreate }, - { "nativeDestroy", "()V", + { "nativeDestroy", "(I)V", (void*) nativeDestroy }, { "nativeDraw", "(Landroid/graphics/Canvas;Landroid/graphics/RectF;II)V", (void*) nativeDraw }, @@ -1335,7 +1336,7 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeTileProfilingGetInt }, { "nativeTileProfilingGetFloat", "(IILjava/lang/String;)F", (void*) nativeTileProfilingGetFloat }, - { "nativeStopGL", "()V", + { "nativeStopGL", "(I)V", (void*) nativeStopGL }, { "nativeScrollableLayer", "(IIILandroid/graphics/Rect;Landroid/graphics/Rect;)I", (void*) nativeScrollableLayer }, |