Bug 1374333 - TalosParentProfiler should be initted if the Gecko Profiler is already active when loaded. r?rwood
MozReview-Commit-ID: F1a3s6Q38wX
--- 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;
/**