Bug 394984: Never try to show progress UI by the elevated process on OSX. r=me
authorStephen A Pohl <spohl.mozilla.bugs@gmail.com>
Tue, 19 Apr 2016 13:53:20 -0400
changeset 491503 aa569c4b3c0cf7a6d959a622f8b350d2bc881887
parent 491502 7a155c7b00417da7a5f0bd39a935060e0853b007
child 491504 873ee4b29de90b9225ca7271706badbbe5862c9e
push id47343
push userbmo:dothayer@mozilla.com
push dateWed, 01 Mar 2017 22:58:58 +0000
reviewersme
bugs394984
milestone48.0a1
Bug 394984: Never try to show progress UI by the elevated process on OSX. r=me
toolkit/mozapps/update/updater/updater.cpp
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -3416,22 +3416,27 @@ int NS_main(int argc, NS_tchar **argv)
     // will be deleted after the update is finished or on OS reboot using
     // MoveFileEx if it contains files that are in use.
     if (NS_taccess(DELETE_DIR, F_OK)) {
       NS_tmkdir(DELETE_DIR, 0755);
     }
   }
 #endif /* XP_WIN */
 
-  // Run update process on a background thread.  ShowProgressUI may return
+  // Run update process on a background thread. ShowProgressUI may return
   // before QuitProgressUI has been called, so wait for UpdateThreadFunc to
-  // terminate.  Avoid showing the progress UI when staging an update.
+  // terminate. Avoid showing the progress UI when staging an update, or if this
+  // is an elevated process on OSX.
   Thread t;
   if (t.Run(UpdateThreadFunc, nullptr) == 0) {
-    if (!sStagedUpdate && !sReplaceRequest) {
+    if (!sStagedUpdate && !sReplaceRequest
+#ifdef XP_MACOSX
+        && !isElevated
+#endif
+       ) {
       ShowProgressUI();
     }
   }
   t.Join();
 
 #ifdef XP_WIN
   if (argc > callbackIndex && !sReplaceRequest) {
     if (callbackFile != INVALID_HANDLE_VALUE) {