Bug 1046942: Start a new Firefox instance upon successful profile unlock; r=bsmedberg
authorAaron Klotz <aklotz@mozilla.com>
Wed, 20 Aug 2014 16:46:56 -0600
changeset 200719 0f22e886cd6a39efb3a2c8f4b886c905ab8fc709
parent 200718 95544f4ebf01e01c086207a6233a5be51a9b284f
child 200720 3ef71326b26335a6d06809b1b24442e19e492bc1
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbsmedberg
bugs1046942
milestone34.0a1
Bug 1046942: Start a new Firefox instance upon successful profile unlock; r=bsmedberg
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -1755,21 +1755,24 @@ ProfileLockedDialog(nsIFile* aProfileDir
       rv = ps->ConfirmEx(nullptr, killTitle, killMessage, flags,
                          killTitle, nullptr, nullptr, nullptr, 
                          &checkState, &button);
       NS_ENSURE_SUCCESS_LOG(rv, rv);
 #endif
 
       if (button == 1) {
         rv = aUnlocker->Unlock(nsIProfileUnlocker::FORCE_QUIT);
-        if (NS_FAILED(rv)) 
+        if (NS_FAILED(rv)) {
           return rv;
-
-        return NS_LockProfilePath(aProfileDir, aProfileLocalDir, 
-                                  nullptr, aResult);
+        }
+
+        SaveFileToEnv("XRE_PROFILE_PATH", aProfileDir);
+        SaveFileToEnv("XRE_PROFILE_LOCAL_PATH", aProfileLocalDir);
+
+        return LaunchChild(aNative);
       }
     } else {
 #ifdef MOZ_WIDGET_ANDROID
       if (mozilla::widget::android::GeckoAppShell::UnlockProfile()) {
         return NS_LockProfilePath(aProfileDir, aProfileLocalDir, 
                                   nullptr, aResult);
       }
 #else