mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Part 8 - Bug 951662 - fix file removal race condition and only launch the callback app from the updater when the MOZ_PROCESS_UPDATES env var is not defined. r=bbondy
This commit is contained in:
parent
493c3c12bf
commit
27483bfe2f
@ -369,6 +369,8 @@ if (MOZ_APP_NAME == "xulrunner") {
|
||||
* Helper function for setting up the test environment.
|
||||
*/
|
||||
function setupTestCommon() {
|
||||
logTestInfo("start - general test setup");
|
||||
|
||||
do_test_pending();
|
||||
|
||||
if (gTestID) {
|
||||
@ -421,6 +423,8 @@ function setupTestCommon() {
|
||||
updatesDir.path + ", Exception: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
logTestInfo("finish - general test setup");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -228,6 +228,22 @@ function checkUpdateFinished() {
|
||||
return;
|
||||
}
|
||||
|
||||
let updater = getUpdatesPatchDir();
|
||||
updater.append(FILE_UPDATER_BIN);
|
||||
if (updater.exists()) {
|
||||
if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
|
||||
do_throw("Exceeded while waiting for updater binary to no longer be in " +
|
||||
"use");
|
||||
} else {
|
||||
try {
|
||||
updater.remove(false);
|
||||
} catch (e) {
|
||||
do_timeout(TEST_CHECK_TIMEOUT, checkUpdateFinished);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let updateTestDir = getUpdateTestDir();
|
||||
|
||||
let file = updateTestDir.clone();
|
||||
|
@ -100,11 +100,16 @@ function checkUpdateFinished() {
|
||||
let updater = getUpdatesPatchDir();
|
||||
updater.append(FILE_UPDATER_BIN);
|
||||
if (updater.exists()) {
|
||||
try {
|
||||
updater.remove(false);
|
||||
} catch (e) {
|
||||
do_timeout(TEST_CHECK_TIMEOUT, checkUpdateFinished);
|
||||
return;
|
||||
if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
|
||||
do_throw("Exceeded while waiting for updater binary to no longer be in " +
|
||||
"use");
|
||||
} else {
|
||||
try {
|
||||
updater.remove(false);
|
||||
} catch (e) {
|
||||
do_timeout(TEST_CHECK_TIMEOUT, checkUpdateFinished);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -232,6 +232,22 @@ function checkUpdateFinished() {
|
||||
return;
|
||||
}
|
||||
|
||||
let updater = getUpdatesPatchDir();
|
||||
updater.append(FILE_UPDATER_BIN);
|
||||
if (updater.exists()) {
|
||||
if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
|
||||
do_throw("Exceeded while waiting for updater binary to no longer be in " +
|
||||
"use");
|
||||
} else {
|
||||
try {
|
||||
updater.remove(false);
|
||||
} catch (e) {
|
||||
do_timeout(TEST_CHECK_TIMEOUT, checkUpdateFinished);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let updateTestDir = getUpdateTestDir();
|
||||
|
||||
let file = updateTestDir.clone();
|
||||
|
@ -104,11 +104,16 @@ function checkUpdateFinished() {
|
||||
let updater = getUpdatesPatchDir();
|
||||
updater.append(FILE_UPDATER_BIN);
|
||||
if (updater.exists()) {
|
||||
try {
|
||||
updater.remove(false);
|
||||
} catch (e) {
|
||||
do_timeout(TEST_CHECK_TIMEOUT, checkUpdateFinished);
|
||||
return;
|
||||
if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
|
||||
do_throw("Exceeded while waiting for updater binary to no longer be in " +
|
||||
"use");
|
||||
} else {
|
||||
try {
|
||||
updater.remove(false);
|
||||
} catch (e) {
|
||||
do_timeout(TEST_CHECK_TIMEOUT, checkUpdateFinished);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3139,10 +3139,12 @@ int NS_main(int argc, NS_tchar **argv)
|
||||
}
|
||||
#endif /* XP_MACOSX */
|
||||
|
||||
LaunchCallbackApp(argv[4],
|
||||
argc - callbackIndex,
|
||||
argv + callbackIndex,
|
||||
sUsingService);
|
||||
if (getenv("MOZ_PROCESS_UPDATES") == nullptr) {
|
||||
LaunchCallbackApp(argv[4],
|
||||
argc - callbackIndex,
|
||||
argv + callbackIndex,
|
||||
sUsingService);
|
||||
}
|
||||
}
|
||||
|
||||
return gSucceeded ? 0 : 1;
|
||||
|
Loading…
Reference in New Issue
Block a user