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

Commit b9376464 authored by John Reck's avatar John Reck
Browse files

Make sure the finalizer destroy runs on the UI thread

 Bug: 5208786
 The finalizer runs on its own thread, but destroy must be called
 on the UI thread

Change-Id: I01ddd675b8aea49aa4e212693551e808a83e45d5
parent 62bb0cdc
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -4021,7 +4021,14 @@ public class WebView extends AbsoluteLayout
    @Override
    protected void finalize() throws Throwable {
        try {
            destroyImpl();
            if (mNativeClass != 0) {
                post(new Runnable() {
                    @Override
                    public void run() {
                        destroy();
                    }
                });
            }
        } finally {
            super.finalize();
        }