merge m-c to fx-team
authorTim Taubert <ttaubert@mozilla.com>
Wed, 08 Aug 2012 11:53:37 +0200
changeset 101658 2dfbe4b9403b18b3aeaa4af3644c11895fd827a3
parent 101653 602c2e7ee0d2b68ca5e86b6085ceb1cd4b54536a (current diff)
parent 101657 ba1293500482668ff9e40f60520a23a32adec672 (diff)
child 101823 b99a81e70b068deb9d56a5e209563df805c48c0d
child 101932 2a6310e0ed9adacdfba048a0a08b25a732d8f71c
push id23249
push userttaubert@mozilla.com
push dateWed, 08 Aug 2012 09:53:59 +0000
treeherdermozilla-central@2dfbe4b9403b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone17.0a1
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
merge m-c to fx-team
--- a/browser/components/sessionstore/test/browser_595601-restore_hidden.js
+++ b/browser/components/sessionstore/test/browser_595601-restore_hidden.js
@@ -38,21 +38,26 @@ function test_loadTabs(restoreHiddenTabs
   newWindowWithState(state, function (win, needsRestore, isRestoring) {
     if (firstProgress) {
       firstProgress = false;
       is(isRestoring, 3, "restoring 3 tabs concurrently");
     } else {
       ok(isRestoring < 4, "restoring max. 3 tabs concurrently");
     }
 
-    if (win.gBrowser.tabs.length - needsRestore == expectedTabs) {
+    // We're explicity checking for (isRestoring == 1) here because the test
+    // progress listener is called before the session store one. So when we're
+    // called with one tab left to restore we know that the last tab has
+    // finished restoring and will soon be handled by the SS listener.
+    let tabsNeedingRestore = win.gBrowser.tabs.length - needsRestore;
+    if (isRestoring == 1 && tabsNeedingRestore == expectedTabs) {
       is(win.gBrowser.visibleTabs.length, 4, "only 4 visible tabs");
 
       TabsProgressListener.uninit();
-      callback();
+      executeSoon(callback);
     }
   });
 }
 
 let TabsProgressListener = {
   init: function (win) {
     this.window = win;
 
--- a/toolkit/mozapps/extensions/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
@@ -6297,17 +6297,23 @@ DirectoryInstallLocation.prototype = {
              entry.path);
         continue;
       }
 
       if (entry.isFile() && !directLoad) {
         let newEntry = this._readDirectoryFromFile(entry);
         if (!newEntry) {
           LOG("Deleting stale pointer file " + entry.path);
-          entry.remove(true);
+          try {
+            entry.remove(true);
+          }
+          catch (e) {
+            WARN("Failed to remove stale pointer file " + entry.path, e);
+            // Failing to remove the stale pointer file is ignorable
+          }
           continue;
         }
 
         entry = newEntry;
         this._linkedAddons.push(id);
       }
 
       this._IDToFileMap[id] = entry;