Bug 1370634 - Make the time to wait the callback application (e.g. firefox.exe) to exit in the updater to be greater than the application's watchdog timer. r=mhowell
authorRobert Strong <robert.bugzilla@gmail.com>
Tue, 06 Jun 2017 20:27:21 -0700
changeset 413108 3ccce72b9da08d67bdc520985bc78f2a40853a55
parent 413107 9948661fdb33b7d10bffc815d05332dae3e1423a
child 413109 f79cc01cb73f6beba75b92bb0719438d5f6accc1
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhowell
bugs1370634
milestone55.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
Bug 1370634 - Make the time to wait the callback application (e.g. firefox.exe) to exit in the updater to be greater than the application's watchdog timer. r=mhowell
toolkit/mozapps/update/updater/updater.cpp
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -62,23 +62,22 @@
 #include "mozilla/UniquePtr.h"
 
 // Amount of the progress bar to use in each of the 3 update stages,
 // should total 100.0.
 #define PROGRESS_PREPARE_SIZE 20.0f
 #define PROGRESS_EXECUTE_SIZE 75.0f
 #define PROGRESS_FINISH_SIZE   5.0f
 
-// Amount of time in ms to wait for the parent process to close
-#ifdef DEBUG
-// Use a large value for debug builds since the xpcshell tests take a long time.
-#define PARENT_WAIT 30000
-#else
-#define PARENT_WAIT 10000
-#endif
+// Maximum amount of time in ms to wait for the parent process to close. The
+// value should be the same or larger than the application's watchdog timeout
+// which is 60 seconds plus 3 additional seconds (see nsTerminator.cpp). This
+// makes it so when the application has a shutdown hang it won't break launching
+// the application after it has been updated.
+#define PARENT_WAIT 70000
 
 #if defined(XP_MACOSX)
 // These functions are defined in launchchild_osx.mm
 void CleanupElevatedMacUpdate(bool aFailureOccurred);
 bool IsOwnedByGroupAdmin(const char* aAppBundle);
 bool IsRecursivelyWritable(const char* aPath);
 void LaunchChild(int argc, const char** argv);
 void LaunchMacPostProcess(const char* aAppBundle);