Backout f8b7d116a096 for Tp regression
authorBrian Nicholson <bnicholson@mozilla.com>
Wed, 21 Mar 2012 17:29:43 -0700
changeset 89991 c1762efb09cf1bfff860d0815b55509ed6eb0044
parent 89990 c50d7ca7c23ea92f8b5a3129f8060927853beda1
child 89992 78b2188530e5a18ab94dbfa07f6012a603a3b82e
push id22300
push usermak77@bonardo.net
push dateThu, 22 Mar 2012 12:08:29 +0000
treeherdermozilla-central@b622d692b8ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone14.0a1
backs outf8b7d116a0964792745df562884d44751a9b15af
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
Backout f8b7d116a096 for Tp regression
mobile/android/app/mobile.js
mobile/android/base/GeckoApp.java
mobile/android/base/GeckoProfile.java
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -140,17 +140,17 @@ pref("browser.display.history.maxresults
 pref("browser.display.remotetabs.timeout", 10);
 
 /* session history */
 pref("browser.sessionhistory.max_total_viewers", 1);
 pref("browser.sessionhistory.max_entries", 50);
 
 /* session store */
 pref("browser.sessionstore.resume_session_once", false);
-pref("browser.sessionstore.resume_from_crash", false);
+pref("browser.sessionstore.resume_from_crash", true);
 pref("browser.sessionstore.resume_from_crash_timeout", 60); // minutes
 pref("browser.sessionstore.interval", 10000); // milliseconds
 pref("browser.sessionstore.max_tabs_undo", 1);
 pref("browser.sessionstore.max_resumed_crashes", 1);
 pref("browser.sessionstore.recent_crashes", 0);
 
 /* these should help performance */
 pref("mozilla.widget.force-24bpp", true);
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1672,20 +1672,19 @@ abstract public class GeckoApp
 
         mBrowserToolbar.setTitle(mLastTitle);
 
         String passedUri = null;
         String uri = getURIFromIntent(intent);
         if (uri != null && uri.length() > 0)
             passedUri = mLastTitle = uri;
 
-        mRestoreSession |= getProfile().shouldRestoreSession();
         if (passedUri == null || passedUri.equals("about:home")) {
             // show about:home if we aren't restoring previous session
-            if (!mRestoreSession) {
+            if (! getProfile().hasSession()) {
                 mBrowserToolbar.updateTabCount(1);
                 showAboutHome();
             }
         } else {
             mBrowserToolbar.updateTabCount(1);
         }
 
         Uri data = intent.getData();
--- a/mobile/android/base/GeckoProfile.java
+++ b/mobile/android/base/GeckoProfile.java
@@ -28,19 +28,16 @@ public final class GeckoProfile {
 
     private static HashMap<String, GeckoProfile> sProfileCache = new HashMap<String, GeckoProfile>();
 
     private final Context mContext;
     private final String mName;
     private File mMozDir;
     private File mDir;
 
-    // this short timeout is a temporary fix until bug 735399 is implemented
-    private static final long SESSION_TIMEOUT = 30 * 1000; // 30 seconds
-
     public static GeckoProfile get(Context context) {
         return get(context, null);
     }
 
     public static GeckoProfile get(Context context, String profileName) {
         if (context == null) {
             throw new IllegalArgumentException("context must be non-null");
         }
@@ -78,29 +75,22 @@ public final class GeckoProfile {
                 Log.d(LOGTAG, "Found profile dir: " + mDir.getAbsolutePath());
             }
         } catch (IOException ioe) {
             Log.e(LOGTAG, "Error getting profile dir", ioe);
         }
         return mDir;
     }
 
-    public boolean shouldRestoreSession() {
+    public boolean hasSession() {
         Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - start check sessionstore.js exists");
         File dir = getDir();
-        if (dir == null)
-            return false;
-
-        File sessionFile = new File(dir, "sessionstore.js");
-        if (!sessionFile.exists())
-            return false;
-
-        boolean shouldRestore = (System.currentTimeMillis() - sessionFile.lastModified() < SESSION_TIMEOUT);
+        boolean hasSession = (dir != null && new File(dir, "sessionstore.js").exists());
         Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - finish check sessionstore.js exists");
-        return shouldRestore;
+        return hasSession;
     }
 
     public String readSessionFile(boolean geckoReady) {
         File dir = getDir();
         if (dir == null) {
             return null;
         }