Bug 1400566 - Explicitly get the global of |this| in CoverageUtils.jsm. r=kmag
With shared JSM globals, |this| is an NSVO, not a global.
MozReview-Commit-ID: V1j4tipw3m
--- a/testing/modules/CoverageUtils.jsm
+++ b/testing/modules/CoverageUtils.jsm
@@ -10,17 +10,17 @@ this.EXPORTED_SYMBOLS = [
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
/* globals Debugger */
const {addDebuggerToGlobal} = Cu.import("resource://gre/modules/jsdebugger.jsm",
{});
-addDebuggerToGlobal(this);
+addDebuggerToGlobal(Cu.getGlobalForObject(this));
/**
* Records coverage for each test by way of the js debugger.
*/
this.CoverageCollector = function(prefix) {
this._prefix = prefix;
this._dbg = new Debugger();
this._dbg.collectCoverageInfo = true;