Bug 1364673 - Hide the mouse throbber when running the pingsender on Windows; r=Dexter
authorGabriele Svelto <gsvelto@mozilla.com>
Mon, 29 May 2017 15:28:36 +0200
changeset 361177 62166eb25771f7ddabda9890a4acd3fbd3b91caa
parent 361176 2f09a955dbd63dabfe4ae4d256078252492855e3
child 361178 f26f1c5652fca64191701d09fc49adf76e0c49a3
push id31917
push usercbook@mozilla.com
push dateTue, 30 May 2017 09:14:52 +0000
treeherdermozilla-central@0c712d76d598 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersDexter
bugs1364673, 1366711
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 1364673 - Hide the mouse throbber when running the pingsender on Windows; r=Dexter This patch uses the functionality introduced in bug 1366711 to launch the pingsender without showing its console window nor a mouse throbber. This also reverts the pingsender into a console application. MozReview-Commit-ID: BTcqAkR9UKB
toolkit/components/telemetry/TelemetrySend.jsm
toolkit/components/telemetry/pingsender/pingsender_win.cpp
--- a/toolkit/components/telemetry/TelemetrySend.jsm
+++ b/toolkit/components/telemetry/TelemetrySend.jsm
@@ -1289,11 +1289,12 @@ var TelemetrySendImpl = {
                                                     : "pingsender";
 
     let exe = Services.dirsvc.get("GreBinD", Ci.nsIFile);
     exe.append(exeName);
 
     let process = Cc["@mozilla.org/process/util;1"]
                   .createInstance(Ci.nsIProcess);
     process.init(exe);
+    process.startHidden = true;
     process.run(/* blocking */ false, [url, pingPath], 2);
   },
 };
--- a/toolkit/components/telemetry/pingsender/pingsender_win.cpp
+++ b/toolkit/components/telemetry/pingsender/pingsender_win.cpp
@@ -3,18 +3,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include <string>
 
 #include <windows.h>
 #include <wininet.h>
 
-#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
-
 namespace PingSender {
 
 using std::string;
 
 /**
  * A helper to automatically close internet handles when they go out of scope
  */
 class ScopedHInternet {