Bug 602976 - Handle onDestroy better, r=blassey a=blocking-fennec
authorMichael Wu <mwu@mozilla.com>
Mon, 08 Nov 2010 18:11:18 -0800
changeset 57135 17bb9e21dfe1791fe2d24dbb77e8a0009701bb75
parent 57134 cf55a728ea5c66754a4e0a78e41b015ebae96cf2
child 57136 ed1d65957bd0039d9fb72805306542108e900cfe
push id16805
push usermwu@mozilla.com
push dateTue, 09 Nov 2010 02:15:10 +0000
treeherdermozilla-central@17bb9e21dfe1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey, blocking-fennec
bugs602976
milestone2.0b8pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 602976 - Handle onDestroy better, r=blassey a=blocking-fennec
embedding/android/GeckoApp.java
--- a/embedding/android/GeckoApp.java
+++ b/embedding/android/GeckoApp.java
@@ -284,17 +284,18 @@ abstract public class GeckoApp
     }
 
     @Override
     public void onDestroy()
     {
         Log.i("GeckoApp", "destroy");
         // Tell Gecko to shutting down; we'll end up calling System.exit()
         // in onXreExit.
-        GeckoAppShell.sendEventToGecko(new GeckoEvent(GeckoEvent.ACTIVITY_STOPPING));
+        if (isFinishing())
+            GeckoAppShell.sendEventToGecko(new GeckoEvent(GeckoEvent.ACTIVITY_STOPPING));
 
         super.onDestroy();
     }
 
     @Override
     public void onConfigurationChanged(android.content.res.Configuration newConfig)
     {
         Log.i("GeckoApp", "configuration changed");