Bug 1287631 - fix typo in Services.appinfo use in devtools; r?fitzgen draft
authorTom Tromey <tom@tromey.com>
Fri, 05 Aug 2016 07:45:18 -0600
changeset 397172 9ae72f38dcb9c05138c963653552986d4f1deb83
parent 396818 0636c302f407c4fd16e551a5ce0267a6df939002
child 527400 9b5b28111ca1ac008f754d3654c4ed95b1c2d9d7
push id25235
push userbmo:ttromey@mozilla.com
push dateFri, 05 Aug 2016 13:49:24 +0000
reviewersfitzgen
bugs1287631
milestone51.0a1
Bug 1287631 - fix typo in Services.appinfo use in devtools; r?fitzgen MozReview-Commit-ID: 1HTz3uRgMfT
devtools/server/actors/heap-snapshot-file.js
devtools/shared/heapsnapshot/tests/unit/head_heapsnapshot.js
--- a/devtools/server/actors/heap-snapshot-file.js
+++ b/devtools/server/actors/heap-snapshot-file.js
@@ -20,19 +20,17 @@ loader.lazyRequireGetter(this, "HeapSnap
 /**
  * The HeapSnapshotFileActor handles transferring heap snapshot files from the
  * server to the client. This has to be a global actor in the parent process
  * because child processes are sandboxed and do not have access to the file
  * system.
  */
 exports.HeapSnapshotFileActor = protocol.ActorClassWithSpec(heapSnapshotFileSpec, {
   initialize: function (conn, parent) {
-    if (Services.appInfo &&
-        (Services.appInfo.processType !==
-         Services.appInfo.PROCESS_TYPE_DEFAULT)) {
+    if (Services.appinfo.processType !== Services.appinfo.PROCESS_TYPE_DEFAULT) {
       const err = new Error("Attempt to create a HeapSnapshotFileActor in a " +
                             "child process! The HeapSnapshotFileActor *MUST* " +
                             "be in the parent process!");
       DevToolsUtils.reportException(
         "HeapSnapshotFileActor.prototype.initialize", err);
       return;
     }
 
--- a/devtools/shared/heapsnapshot/tests/unit/head_heapsnapshot.js
+++ b/devtools/shared/heapsnapshot/tests/unit/head_heapsnapshot.js
@@ -24,18 +24,17 @@ const { censusReportToCensusTreeNode } =
 const CensusUtils = require("devtools/shared/heapsnapshot/CensusUtils");
 const DominatorTreeNode = require("devtools/shared/heapsnapshot/DominatorTreeNode");
 const { deduplicatePaths } = require("devtools/shared/heapsnapshot/shortest-paths");
 const { LabelAndShallowSizeVisitor } = DominatorTreeNode;
 
 
 // Always log packets when running tests. runxpcshelltests.py will throw
 // the output away anyway, unless you give it the --verbose flag.
-if (Services.appInfo &&
-    Services.appInfo.processType == Services.appInfo.PROCESS_TYPE_DEFAULT) {
+if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_DEFAULT) {
   Services.prefs.setBoolPref("devtools.debugger.log", true);
 }
 DevToolsUtils.dumpn.wantLogging = true;
 
 const SYSTEM_PRINCIPAL = Cc["@mozilla.org/systemprincipal;1"]
   .createInstance(Ci.nsIPrincipal);
 
 function dumpn(msg) {