Skip to content

Commit 2fe9980

Browse files
committed
Add temporary functor lifetime logging
bug:6405861 Note: revert once the above bug is verified fixed Change-Id: Iae04ec6ffa73a2711f96e128d60011bcb5864b5c
1 parent e849230 commit 2fe9980

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

core/java/android/webkit/WebViewClassic.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,6 +2018,11 @@ public void destroy() {
20182018
}
20192019

20202020
private void destroyImpl() {
2021+
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
2022+
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
2023+
Log.d(LOGTAG, String.format("destroyImpl, drawGLFunction %x, viewroot == null %b, isHWAccel %b",
2024+
drawGLFunction, (viewRoot == null), mWebView.isHardwareAccelerated()));
2025+
20212026
mCallbackProxy.blockMessages();
20222027
clearHelpers();
20232028
if (mListBoxDialog != null) {
@@ -5434,9 +5439,11 @@ public void onDetachedFromWindow() {
54345439
removeAccessibilityApisFromJavaScript();
54355440
updateHwAccelerated();
54365441

5442+
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
5443+
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
5444+
Log.d(LOGTAG, String.format("onDetachedFromWindow, drawGLFunction %x, viewroot == null %b, isHWAccel %b",
5445+
drawGLFunction, (viewRoot == null), mWebView.isHardwareAccelerated()));
54375446
if (mWebView.isHardwareAccelerated()) {
5438-
int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
5439-
ViewRootImpl viewRoot = mWebView.getViewRootImpl();
54405447
if (drawGLFunction != 0 && viewRoot != null) {
54415448
viewRoot.detachFunctor(drawGLFunction);
54425449
}

libs/hwui/OpenGLRenderer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ void OpenGLRenderer::resume() {
247247
}
248248

249249
void OpenGLRenderer::detachFunctor(Functor* functor) {
250+
ALOGD("OGLR %p detachFunctor %p", this, functor);
250251
mFunctors.remove(functor);
251252
}
252253

0 commit comments

Comments
 (0)