Merge with m-c
authorDoug Turner <dougt@dougt.org>
Tue, 29 Jun 2010 16:30:47 -0700
changeset 46935 e6d93fff753b1bab26cbd64f13dd331168e4f412
parent 46934 84eb81208a4acd48696bdb82f0c90e7697807a19 (current diff)
parent 46422 c79b744ca11445359632fe9c7cda0c808e213c77 (diff)
child 46936 71114e4522c7f938ecd669d5f9de020e0e48b659
push id14210
push userdougt@mozilla.com
push dateThu, 01 Jul 2010 06:28:42 +0000
treeherderautoland@3aff97777291 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0b2pre
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 with m-c
--- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/content/browser.js
+++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/content/browser.js
@@ -145,31 +145,58 @@ var TestPilotMenuUtils;
 
 
   var TestPilotWindowHandlers = {
     onWindowLoad: function() {
       /* "Hold" window load events for TestPilotSetup, passing them along only
        * after startup is complete.  It's hacky, but the benefit is that
        * TestPilotSetup.onWindowLoad can treat all windows the same no matter
        * whether they opened with Firefox on startup or were opened later. */
+      TestPilotWindowHandlers.setUpToolbarFeedbackButton();
+
       if (TestPilotSetup.startupComplete) {
         TestPilotSetup.onWindowLoad(window);
       } else {
         let observerSvc = Cc["@mozilla.org/observer-service;1"]
                              .getService(Ci.nsIObserverService);
         let observer = {
           observe: function(subject, topic, data) {
             observerSvc.removeObserver(this, "testpilot:startup:complete");
             TestPilotSetup.onWindowLoad(window);
           }
         };
         observerSvc.addObserver(observer, "testpilot:startup:complete", false);
       }
     },
 
+    setUpToolbarFeedbackButton: function() {
+      /* If this is first run, and it's ffx4 beta version, and the feedback
+       * button is not in the expected place, put it there!
+       * (copied from MozReporterButtons extension) */
+      if (!window.document.getElementById("feedback-menu-happy-button")) {
+        return;
+      }
+      let firefoxnav = window.document.getElementById("nav-bar");
+      let curSet = firefoxnav.currentSet;
+
+      if (-1 == curSet.indexOf("feedback-menu-button")) {
+        // place the buttons after the search box.
+        let newSet = curSet + ",feedback-menu-button";
+
+        firefoxnav.setAttribute("currentset", newSet);
+        firefoxnav.currentSet = newSet;
+        window.document.persist("nav-bar", "currentset");
+        // if you don't do the following call, funny things happen.
+        try {
+          BrowserToolboxCustomizeDone(true);
+        } catch (e) {
+        }
+      }
+    },
+
     onWindowUnload: function() {
       TestPilotSetup.onWindowUnload(window);
     }
   };
 
   window.addEventListener("load", TestPilotWindowHandlers.onWindowLoad, false);
   window.addEventListener("unload", TestPilotWindowHandlers.onWindowUnload, false);
 }());
--- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js
+++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js
@@ -208,45 +208,16 @@ let TestPilotSetup = {
       prefBranch.setBoolPref(POPUP_SHOW_ON_NEW, true);
       prefBranch.setIntPref(POPUP_CHECK_INTERVAL, 600000);
     } else {
       prefBranch.setBoolPref(POPUP_SHOW_ON_NEW, false);
       prefBranch.setIntPref(POPUP_CHECK_INTERVAL, 180000);
     }
   },
 
-  _setUpToolbarFeedbackButton: function TPS_toolbarFeedbackButton() {
-    /* If this is first run, and it's ffx4 beta version, and the feedback
-     * button is not in the expected place, put it there!
-     * (copied from MozReporterButtons extension) */
-    let logger = this._logger;
-    try {
-      let win = this._getFrontBrowserWindow();
-      let firefoxnav = win.document.getElementById("nav-bar");
-      let curSet = firefoxnav.currentSet;
-
-      if (-1 == curSet.indexOf("feedback-menu-button")) {
-        logger.info("Feedback toolbar button not present: Adding it.");
-        // place the buttons after the search box.
-        let newSet = curSet + ",feedback-menu-button";
-
-        firefoxnav.setAttribute("currentset", newSet);
-        firefoxnav.currentSet = newSet;
-        win.document.persist("nav-bar", "currentset");
-        // if you don't do the following call, funny things happen.
-        try {
-          BrowserToolboxCustomizeDone(true);
-        } catch (e) {
-        }
-      }
-    } catch (e) {
-      logger.warn("Error in setUpToolbarFeedbackButton: " + e);
-    }
-  },
-
   globalStartup: function TPS__doGlobalSetup() {
     // Only ever run this stuff ONCE, on the first window restore.
     // Should get called by the Test Pilot component.
     let logger = this._logger;
     logger.trace("TestPilotSetup.globalStartup was called.");
 
     try {
     this._setPrefDefaultsForVersion();
@@ -291,21 +262,18 @@ let TestPilotSetup = {
 
         if (currVersion != self.version) {
           if(!self._isFfx4BetaVersion()) {
             self._prefs.setValue(VERSION_PREF, self.version);
             let browser = self._getFrontBrowserWindow().getBrowser();
             let url = self._prefs.getValue(FIRST_RUN_PREF, "");
             let tab = browser.addTab(url);
             browser.selectedTab = tab;
-          } else {
-            // Don't show first run page in ffx4 beta version... but do
-            // set up the Feedback button in the toolbar.
-            self._setUpToolbarFeedbackButton();
           }
+          // Don't show first run page in ffx4 beta version.
         }
 
         // Install tasks. (This requires knowing the version, so it is
         // inside the callback from getVersion.)
         self.checkForTasks(function() {
           /* Callback to complete startup after we finish
            * checking for tasks. */
          self.startupComplete = true;
--- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js
+++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js
@@ -204,16 +204,19 @@ var TestPilotTask = {
 
   onDetailPageOpened: function TestPilotTask_onDetailPageOpened(){
   },
 
   checkDate: function TestPilotTask_checkDate() {
   },
 
   changeStatus: function TPS_changeStatus(newStatus, suppressNotification) {
+    // TODO we always suppress notifications except when new status is
+    // "finished"; maybe remove that argument and only fire notification
+    // when status is "finished".
     let logger = Log4Moz.repository.getLogger("TestPilot.Task");
     logger.info("Changing task " + this._id + " status to " + newStatus);
     this._status = newStatus;
     // Set the pref:
     Application.prefs.setValue(STATUS_PREF_PREFIX + this._id, newStatus);
     // Notify user of status change:
     if (!suppressNotification) {
       Observers.notify("testpilot:task:changed", "", null);
@@ -579,17 +582,17 @@ TestPilotExperiment.prototype = {
 	currentDate <= this._endDate) {
       // if we've done a permanent opt-out, then don't start over-
       // just keep rescheduling.
       if (this.recurPref == TaskConstants.NEVER_SUBMIT) {
         this._logger.info("recurPref is never submit, so I'm rescheduling.");
         this._reschedule();
       } else {
         // Normal case is reset to new.
-        this.changeStatus(TaskConstants.STATUS_NEW);
+        this.changeStatus(TaskConstants.STATUS_NEW, true);
 
         // increment count of how many times this recurring test has run
         let numTimesRun = this._numTimesRun;
         numTimesRun++;
         this._logger.trace("Test recurring... incrementing " + RECUR_TIMES_PREF_PREFIX + this._id + " to " + numTimesRun);
         Application.prefs.setValue( RECUR_TIMES_PREF_PREFIX + this._id,
                                     numTimesRun );
         this._logger.trace("Incremented it.");
@@ -605,17 +608,17 @@ TestPilotExperiment.prototype = {
         Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
       let uuid = uuidGenerator.generateUUID().toString();
       // remove the brackets from the generated UUID
       if (uuid.indexOf("{") == 0) {
         uuid = uuid.substring(1, (uuid.length - 1));
       }
       // clear the data before starting.
       this._dataStore.wipeAllData();
-      this.changeStatus(TaskConstants.STATUS_STARTING);
+      this.changeStatus(TaskConstants.STATUS_STARTING, true);
       Application.prefs.setValue(GUID_PREF_PREFIX + this._id, uuid);
       this.onExperimentStartup();
     }
 
     // What happens when a test finishes:
     if (this._status < TaskConstants.STATUS_FINISHED &&
 	currentDate > this._endDate) {
       let self = this;
--- a/browser/installer/removed-files.in
+++ b/browser/installer/removed-files.in
@@ -42,16 +42,17 @@ components/aboutSessionRestore.js
 components/autocomplete.xpt
 components/airbag.xpt
 components/bookmarks.xpt
 components/compreg.dat
 components/history.xpt
 components/microsummaries.xpt
 components/myspell/en-US.aff
 components/myspell/en-US.dic
+components/nsAddonRepository.js
 components/nsBackgroundUpdateService.js
 components/nsBookmarkTransactionManager.js
 components/nsCloseAllWindows.js
 components/nsDictionary.js
 components/nsExtensionManager.js
 components/nsInterfaceInfoToIDL.js
 components/nsScriptableIO.js
 components/nsUrlClassifierTable.js
--- a/toolkit/components/places/src/History.cpp
+++ b/toolkit/components/places/src/History.cpp
@@ -864,16 +864,24 @@ History::~History()
   gService = NULL;
 
 #ifdef DEBUG
   if (mObservers.IsInitialized()) {
     NS_ASSERTION(mObservers.Count() == 0,
                  "Not all Links were removed before we disappear!");
   }
 #endif
+
+  NS_WARN_IF_FALSE(!mPendingVisits.PeekFront(), "Tasks were not completed :(");
+
+  // History is going away, so abandon tasks.
+  while (mPendingVisits.PeekFront()) {
+    nsCOMPtr<Step> deadTaskWalking =
+      dont_AddRef(static_cast<Step*>(mPendingVisits.PopFront()));
+  }
 }
 
 void
 History::AppendTask(Step* aTask)
 {
   NS_PRECONDITION(aTask, "Got NULL task.");
 
   NS_ADDREF(aTask);