Commit a8979633 authored by James Willcox's avatar James Willcox
Browse files

Bug 752153 - Improve the exit procedure for the Gecko Android Looper r=blassey

--HG--
extra : rebase_source : 13bef9a232f076b883aab9ab1ef48f5e82f50a06
parent 46573c96
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2146,7 +2146,7 @@ public class GeckoAppShell

    public static void pumpMessageLoop() {
        // We're going to run the Looper below, but we need a way to break out, so
        // we post this Runnable that throws a RuntimeException. This causes the loop
        // we post this Runnable that throws an AssertionError. This causes the loop
        // to exit without marking the Looper as dead. The Runnable is added to the
        // end of the queue, so it will be executed after anything
        // else that has been added prior.
@@ -2157,13 +2157,13 @@ public class GeckoAppShell
        // here we are.
        sGeckoHandler.post(new Runnable() {
            public void run() {
                throw new RuntimeException();
                throw new AssertionError();
            }
        });
        
        try {
            Looper.loop();
        } catch(Exception ex) {}
        } catch(Throwable ex) {}
    }

    static class AsyncResultHandler extends GeckoApp.FilePickerResultHandler {