Skip to content

Commit ca5a148

Browse files
ChrisCraikAndroid (Google) Code Review
authored andcommitted
Merge "Add temporary functor detach logging" into jb-dev
2 parents a3404be + f98851a commit ca5a148

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

core/java/android/webkit/WebViewClassic.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,13 +2069,16 @@ public void destroy() {
20692069
}
20702070

20712071
private void destroyImpl() {
2072+
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
20722073
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
2074+
Log.d(LOGTAG, String.format(this + "destroyImpl, drawGLFunction %x, viewroot == null %b, isHWAccel %b",
2075+
drawGLFunction, (viewRoot == null), mWebView.isHardwareAccelerated()));
2076+
20732077
if (viewRoot != null) {
20742078
Log.e(LOGTAG, "Error: WebView.destroy() called while still attached!");
20752079
}
20762080

20772081
if (mWebView.isHardwareAccelerated()) {
2078-
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
20792082
if (drawGLFunction != 0 && viewRoot != null) {
20802083
// functor should have been detached in onDetachedFromWindow, do
20812084
// additionally here for safety
@@ -5313,9 +5316,12 @@ public void onDetachedFromWindow() {
53135316

53145317
updateHwAccelerated();
53155318

5319+
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
5320+
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
5321+
Log.d(LOGTAG, String.format(this + "onDetachedFromWindow, drawGLFunction %x, viewroot == null %b, isHWAccel %b",
5322+
drawGLFunction, (viewRoot == null), mWebView.isHardwareAccelerated()));
5323+
53165324
if (mWebView.isHardwareAccelerated()) {
5317-
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
5318-
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
53195325
if (drawGLFunction != 0 && viewRoot != null) {
53205326
viewRoot.detachFunctor(drawGLFunction);
53215327
}

0 commit comments

Comments
 (0)