Skip to content

Instantly share code, notes, and snippets.

View fitzgen's full-sized avatar
🌴
On vacation

Nick Fitzgerald fitzgen

🌴
On vacation
View GitHub Profile
@fitzgen
fitzgen / gist:1346669
Created November 8, 2011 00:41 — forked from zpao/gist:1346649
diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp
index afa2125..2afdbb8 100644
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -7230,7 +7230,6 @@ dumpValue(const Value &v)
fprintf(stderr, "false");
} else if (v.isMagic()) {
fprintf(stderr, "<invalid");
-#ifdef DEBUG
switch (v.whyMagic()) {
let { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
function openToolbox() {
let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
return gDevTools.showToolbox(target, "jsdebugger");
}
function closeToolbox() {
let target = devtools.TargetFactory.forTab(gBrowser.selectedTab);
return gDevTools.closeToolbox(target);
Cu.import("resource://gre/modules/jsdebugger.jsm");
addDebuggerToGlobal(this);
let browser = gBrowser.getBrowserForTab(gBrowser.selectedTab);
let contentWindow = browser.contentWindow;
let dbg = new Debugger(contentWindow);
let start = Date.now();
dbg.memory.captureDominatorTree(contentWindow)