Bug 758410 - Installs of service should not attempt to clear prefetch. r=rstrong
authorBrian R. Bondy <netzen@gmail.com>
Sun, 27 May 2012 22:40:48 -0400
changeset 95069 fb61360eab85c6b908ab08dab2009aa8010a9912
parent 95068 b3ca05098ddcbb2dd07cc9fce53b3e01f638c3db
child 95070 de230f4a91f76f4a32899dbcb5647c6f6bf29243
push id22777
push userbbondy@mozilla.com
push dateMon, 28 May 2012 02:41:10 +0000
treeherdermozilla-central@93018b4bf4da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong
bugs758410
milestone15.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 758410 - Installs of service should not attempt to clear prefetch. r=rstrong
toolkit/components/maintenanceservice/maintenanceservice.cpp
--- a/toolkit/components/maintenanceservice/maintenanceservice.cpp
+++ b/toolkit/components/maintenanceservice/maintenanceservice.cpp
@@ -27,17 +27,17 @@ bool gServiceControlStopping = false;
 
 BOOL GetLogDirectoryPath(WCHAR *path);
 
 /**
  * Wraps all commands that should be executed by the service on each install
  * and upgrade.
 */
 void
-RunCommandsForEachInstallAndUpgrade()
+RunCommandsForEachUpgrade()
 {
   LOG(("Running install/upgrade commands...\n"));
   ClearKnownPrefetch();
   LOG(("Finished install/upgrade commands\n"));
 }
 
 int 
 wmain(int argc, WCHAR **argv)
@@ -61,17 +61,16 @@ wmain(int argc, WCHAR **argv)
     SvcInstallAction action = InstallSvc;
     if (forceInstall) {
       action = ForceInstallSvc;
       LOG((" with force specified"));
     }
     LOG(("...\n"));
 
     bool ret = SvcInstall(action);
-    RunCommandsForEachInstallAndUpgrade();
     if (!ret) {
       LOG(("Could not install service (%d)\n", GetLastError()));
       LogFinish();
       return 1;
     }
 
     LOG(("The service was installed successfully\n"));
     LogFinish();
@@ -81,17 +80,17 @@ wmain(int argc, WCHAR **argv)
   if (!lstrcmpi(argv[1], L"upgrade")) {
     WCHAR updatePath[MAX_PATH + 1];
     if (GetLogDirectoryPath(updatePath)) {
       LogInit(updatePath, L"maintenanceservice-install.log");
     }
     LOG(("Upgrading service if installed...\n"));
 
     bool ret = SvcInstall(UpgradeSvc);
-    RunCommandsForEachInstallAndUpgrade();
+    RunCommandsForEachUpgrade();
     if (!ret) {
       LOG(("Could not upgrade service (%d)\n", GetLastError()));
       LogFinish();
       return 1;
     }
 
     LOG(("The service was upgraded successfully\n"));
     LogFinish();