acceptGlobal = g => { // self-hosting-global crashes when trying to call unsafeDereference if (g.class == "self-hosting-global") { return false; } const ref = g.unsafeDereference(); const location = Cu.getRealmLocation(ref); const accept = !!location.match(/devtools/i); dump("TRACKER NEW GLOBAL: " + (accept ? "+" : "-") + " : " + location + "\n"); return accept; };