Bug 1035557 - Migrate crash checkpoints with the session so that we don't appear to crash during reset. r=ttaubert, a=lmandel
authorSteven MacLeod <smacleod@mozilla.com>
Mon, 11 Aug 2014 16:41:27 -0400
changeset 208344 8d583074b918
parent 208343 ec5427a8e674
child 208345 b554afc480aa
push id3833
push usersmacleod@mozilla.com
push date2014-08-20 19:08 +0000
treeherdermozilla-beta@8d583074b918 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert, lmandel
bugs1035557
milestone32.0
Bug 1035557 - Migrate crash checkpoints with the session so that we don't appear to crash during reset. r=ttaubert, a=lmandel (grafted from a93ff5caef5fb5edfe476b4e984db3605d47e8b3)
browser/components/migration/src/FirefoxProfileMigrator.js
--- a/browser/components/migration/src/FirefoxProfileMigrator.js
+++ b/browser/components/migration/src/FirefoxProfileMigrator.js
@@ -82,22 +82,24 @@ FirefoxProfileMigrator.prototype.getReso
   let cookies = getFileResource(types.COOKIES, ["cookies.sqlite"]);
   let passwords = getFileResource(types.PASSWORDS,
                                   ["signons.sqlite", "key3.db"]);
   let formData = getFileResource(types.FORMDATA, ["formhistory.sqlite"]);
   let bookmarksBackups = getFileResource(types.OTHERDATA,
     [PlacesBackups.profileRelativeFolderPath]);
   let dictionary = getFileResource(types.OTHERDATA, ["persdict.dat"]);
 
+  let sessionCheckpoints = this._getFileObject(sourceProfileDir, "sessionCheckpoints.json");
   let sessionFile = this._getFileObject(sourceProfileDir, "sessionstore.js");
   let session;
   if (sessionFile) {
     session = {
       type: types.SESSION,
       migrate: function(aCallback) {
+        sessionCheckpoints.copyTo(currentProfileDir, "sessionCheckpoints.json");
         let newSessionFile = currentProfileDir.clone();
         newSessionFile.append("sessionstore.js");
         let migrationPromise = SessionMigration.migrate(sessionFile.path, newSessionFile.path);
         migrationPromise.then(function() {
           let buildID = Services.appinfo.platformBuildID;
           let mstone = Services.appinfo.platformVersion;
           // Force the browser to one-off resume the session that we give it:
           Services.prefs.setBoolPref("browser.sessionstore.resume_session_once", true);