Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe952ba0 authored by Chris Craik's avatar Chris Craik Committed by Android Git Automerger
Browse files

am 9238e5b9: am ca5a1489: Merge "Add temporary functor detach logging" into jb-dev

* commit '9238e5b9':
  Add temporary functor detach logging
parents 547dd672 9238e5b9
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -2068,13 +2068,16 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
    }

    private void destroyImpl() {
        int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
        ViewRootImpl viewRoot = mWebView.getViewRootImpl();
        Log.d(LOGTAG, String.format(this + "destroyImpl, drawGLFunction %x,  viewroot == null %b, isHWAccel %b",
                                    drawGLFunction, (viewRoot == null), mWebView.isHardwareAccelerated()));

        if (viewRoot != null) {
            Log.e(LOGTAG, "Error: WebView.destroy() called while still attached!");
        }

        if (mWebView.isHardwareAccelerated()) {
            int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
            if (drawGLFunction != 0 && viewRoot != null) {
                // functor should have been detached in onDetachedFromWindow, do
                // additionally here for safety
@@ -5313,9 +5316,12 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc

        updateHwAccelerated();

        if (mWebView.isHardwareAccelerated()) {
        int drawGLFunction = nativeGetDrawGLFunction(mNativeClass);
        ViewRootImpl viewRoot = mWebView.getViewRootImpl();
        Log.d(LOGTAG, String.format(this + "onDetachedFromWindow, drawGLFunction %x,  viewroot == null %b, isHWAccel %b",
                                    drawGLFunction, (viewRoot == null), mWebView.isHardwareAccelerated()));

        if (mWebView.isHardwareAccelerated()) {
            if (drawGLFunction != 0 && viewRoot != null) {
                viewRoot.detachFunctor(drawGLFunction);
            }