diff options
author | John Reck <jreck@google.com> | 2012-06-07 17:18:10 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-06-07 17:18:10 -0700 |
commit | 97bd7ccc9301b29a54d2b622ee874f25cbd553fa (patch) | |
tree | 7520d7fa7d3c170f413ba674bf947b668d686073 /Source/WebKit/android/nav/WebView.cpp | |
parent | 407052467dfe2dbbcec2898e28ed114972369196 (diff) | |
parent | 334b406839a240e271a59a1157839bfe25c3470e (diff) | |
download | external_webkit-97bd7ccc9301b29a54d2b622ee874f25cbd553fa.zip external_webkit-97bd7ccc9301b29a54d2b622ee874f25cbd553fa.tar.gz external_webkit-97bd7ccc9301b29a54d2b622ee874f25cbd553fa.tar.bz2 |
am 334b4068: am 92d7c4c4: Merge "Switch stopGL and destroy to use a passed in ptr" into jb-dev
* commit '334b406839a240e271a59a1157839bfe25c3470e':
Switch stopGL and destroy to use a passed in ptr
Diffstat (limited to 'Source/WebKit/android/nav/WebView.cpp')
-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 5e2354b..8b6d5f0 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -993,17 +993,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) @@ -1309,7 +1310,7 @@ static bool nativeIsHandleLeft(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 }, @@ -1351,7 +1352,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 }, |