Bug 1374333 - TalosParentProfiler should be initted if the Gecko Profiler is already active when loaded. r?rwood draft
authorMike Conley <mconley@mozilla.com>
Mon, 19 Jun 2017 16:35:38 -0400
changeset 610824 a29440b3a8f251ab1292b00640c2c3730c0dfe3d
parent 610649 dece50457378ac4934afe9fb3c2a8054e8894588
child 610825 4592b5c7abca547c3df0f5dc8d8ad4c701c1079a
push id69002
push usermconley@mozilla.com
push dateTue, 18 Jul 2017 19:11:35 +0000
reviewersrwood
bugs1374333
milestone56.0a1
Bug 1374333 - TalosParentProfiler should be initted if the Gecko Profiler is already active when loaded. r?rwood MozReview-Commit-ID: F1a3s6Q38wX
testing/talos/talos/talos-powers/content/TalosParentProfiler.js
--- a/testing/talos/talos/talos-powers/content/TalosParentProfiler.js
+++ b/testing/talos/talos/talos-powers/content/TalosParentProfiler.js
@@ -12,32 +12,31 @@
  *
  * If your test is running in the content process, you should use
  * TalosContentProfiler.js instead.
  */
 
 var TalosParentProfiler;
 
 (function() {
+  Components.utils.import("resource://gre/modules/Services.jsm");
+  Components.utils.import("resource://gre/modules/Console.jsm");
 
   // Whether or not this TalosContentProfiler object has had initFromObject
   // or initFromURLQueryParams called on it. Any functions that change the
   // state of the Gecko Profiler should only be called after calling either
   // initFromObject or initFromURLQueryParams.
-  let initted = false;
+  let initted = Services.profiler.IsActive();
 
   // The subtest name that beginTest() was called with.
   let currentTest = "unknown";
 
   // Profiler settings.
   let interval, entries, threadsArray, profileDir;
 
-  Components.utils.import("resource://gre/modules/Services.jsm");
-  Components.utils.import("resource://gre/modules/Console.jsm");
-
   // Use a bit of XPCOM hackery to get at the Talos Powers service
   // implementation...
   let TalosPowers =
     Components.classes["@mozilla.org/talos/talos-powers-service;1"]
               .getService(Components.interfaces.nsISupports)
               .wrappedJSObject;
 
   /**