Bug 1520518 - Port bug 1517636: Add launcher process state to about:support. r=jorgk
authorRichard Marti <richard.marti@gmail.com>
Wed, 16 Jan 2019 17:21:45 +0100
changeset 34227 ef2abc8fb99e9d73ba4cd4a186ea64575c0324c8
parent 34226 10e4790e1368296d6f9cfceb5fb3c4fab9e8af61
child 34228 335361a67f2d354655b2beb5c670b74a57f96725
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
reviewersjorgk
bugs1520518, 1517636
Bug 1520518 - Port bug 1517636: Add launcher process state to about:support. r=jorgk
mail/components/about-support/content/aboutSupport.js
mail/components/about-support/content/aboutSupport.xhtml
--- a/mail/components/about-support/content/aboutSupport.js
+++ b/mail/components/about-support/content/aboutSupport.js
@@ -77,16 +77,29 @@ var snapshotFormatters = {
     let version = AppConstants.MOZ_APP_VERSION_DISPLAY;
     if (data.vendor)
       version += " (" + data.vendor + ")";
     $("version-box").textContent = version;
     $("buildid-box").textContent = data.buildID;
     if (data.updateChannel)
       $("updatechannel-box").textContent = data.updateChannel;
 
+    try {
+      let launcherStatusTextId = "launcher-process-status-unknown";
+      switch (data.launcherProcessState) {
+        case 0:
+        case 1:
+        case 2:
+          launcherStatusTextId = "launcher-process-status-" + data.launcherProcessState;
+          break;
+      }
+
+      document.l10n.setAttributes($("launcher-process-box"), launcherStatusTextId);
+    } catch (e) {}
+
     let statusTextId = "multi-process-status-unknown";
 
     // Whitelist of known values with string descriptions:
     switch (data.autoStartStatus) {
       case 0:
       case 1:
       case 2:
       case 4:
--- a/mail/components/about-support/content/aboutSupport.xhtml
+++ b/mail/components/about-support/content/aboutSupport.xhtml
@@ -177,16 +177,25 @@
           <tr class="no-copy">
             <th class="column" data-l10n-id="app-basics-service-workers"/>
 
             <td>
               <a href="about:serviceworkers">about:serviceworkers</a>
             </td>
           </tr>
 
+#if defined(XP_WIN) && defined(MOZ_LAUNCHER_PROCESS)
+          <tr>
+            <th class="column" data-l10n-id="app-basics-launcher-process-status"/>
+
+            <td id="launcher-process-box">
+            </td>
+          </tr>
+#endif
+
           <tr>
             <th class="column" data-l10n-id="app-basics-multi-process-support"/>
 
             <td id="multiprocess-box">
               <span id="multiprocess-box-process-count"/>
               <span id="multiprocess-box-status" data-l10n-id="multi-process-status-unknown"/>
             </td>
           </tr>