Bug 1341450 - Repair incorrect check for missing DMDReportAndDump function. r=jmaher
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 21 Feb 2017 18:58:30 -0500
changeset 373275 0894bd95e396e6cd6181e5b84671e5262c5beb1f
parent 373274 6e1c2cb7b5ba8441d59433368794b602643807ab
child 373276 aa38899a1ec6617ab5846d0b81ae21c29793843d
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1341450
milestone54.0a1
Bug 1341450 - Repair incorrect check for missing DMDReportAndDump function. r=jmaher MozReview-Commit-ID: 9lZEvxOYoR3
testing/mochitest/tests/SimpleTest/MemoryStats.js
--- a/testing/mochitest/tests/SimpleTest/MemoryStats.js
+++ b/testing/mochitest/tests/SimpleTest/MemoryStats.js
@@ -99,24 +99,24 @@ MemoryStats.dump = function (testNumber,
         var md = MemoryStats._getService("@mozilla.org/memory-info-dumper;1",
                                          "nsIMemoryInfoDumper");
         md.dumpMemoryReportsToNamedFile(dumpfile, function () {
             info("TEST-INFO | " + testURL + " | MEMDUMP-END");
         }, null, /* anonymize = */ false);
     }
 
     // This is the old, deprecated function.
-    if (dumpDMD && typeof(DMDReportAndDump) != undefined) {
+    if (dumpDMD && typeof(DMDReportAndDump) != "undefined") {
         var basename = "dmd-" + testNumber + "-deprecated.txt";
         var dumpfile = MemoryStats.constructPathname(dumpOutputDirectory,
                                                      basename);
         info(testURL + " | DMD-DUMP-deprecated " + dumpfile);
         DMDReportAndDump(dumpfile);
     }
 
-    if (dumpDMD && typeof(DMDAnalyzeReports) != undefined) {
+    if (dumpDMD && typeof(DMDAnalyzeReports) != "undefined") {
         var basename = "dmd-" + testNumber + ".txt";
         var dumpfile = MemoryStats.constructPathname(dumpOutputDirectory,
                                                      basename);
         info(testURL + " | DMD-DUMP " + dumpfile);
         DMDAnalyzeReports(dumpfile);
     }
 };