Bug 1364673 - Hide the mouse throbber when running the pingsender on Windows; r?Dexter draft
authorGabriele Svelto <gsvelto@mozilla.com>
Mon, 29 May 2017 15:28:36 +0200
changeset 585968 a409cf23483e56c317b985813007a32d7d455e7c
parent 585921 cce4d83d2b99ffedbd67a2f40ce26e53e9ae27ab
child 630844 0b2be3a9388536aa613be4a19386967442f25751
push id61245
push usergsvelto@mozilla.com
push dateMon, 29 May 2017 13:31:35 +0000
reviewersDexter
bugs1364673, 1366711
milestone55.0a1
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 {