Bug 799307 - Remove some XPCDebug.cpp cruft that was obsoleted by bug 787856. r=billm
authorChris Peterson <cpeterson@mozilla.com>
Mon, 08 Oct 2012 17:29:47 -0700
changeset 109759 0aa267c72cf60d6695bea5e9b74cae97ad4d16ed
parent 109758 8f844ca34b7fb3b4e6401fac244505ccad2556cb
child 109760 ab420f694c83275081575f88ebc1fb1d657ef3cd
push id16180
push usercpeterson@mozilla.com
push dateTue, 09 Oct 2012 17:32:26 +0000
treeherdermozilla-inbound@0aa267c72cf6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs799307, 787856
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 799307 - Remove some XPCDebug.cpp cruft that was obsoleted by bug 787856. r=billm
js/xpconnect/src/XPCDebug.cpp
js/xpconnect/src/xpcprivate.h
--- a/js/xpconnect/src/XPCDebug.cpp
+++ b/js/xpconnect/src/XPCDebug.cpp
@@ -126,54 +126,8 @@ xpc_DebuggerKeywordHandler(JSContext *cx
     DebugDump("%s", line);
     return JSTRAP_CONTINUE;
 }
 
 JSBool xpc_InstallJSDebuggerKeywordHandler(JSRuntime* rt)
 {
     return JS_SetDebuggerHandler(rt, xpc_DebuggerKeywordHandler, nullptr);
 }
-
-/***************************************************************************/
-
-// The following will dump info about an object to stdout...
-
-
-// Quick and dirty (debug only damnit!) class to track which JSObjects have
-// been visited as we traverse.
-
-class ObjectPile
-{
-public:
-    enum result {primary, seen, overflow};
-
-    result Visit(JSObject* obj)
-    {
-        if (member_count == max_count)
-            return overflow;
-        for (int i = 0; i < member_count; i++)
-            if (array[i] == obj)
-                return seen;
-        array[member_count++] = obj;
-        return primary;
-    }
-
-    ObjectPile() : member_count(0){}
-
-private:
-    enum {max_count = 50};
-    JSObject* array[max_count];
-    int member_count;
-};
-
-
-static const int tab_width = 2;
-#define INDENT(_d) (_d)*tab_width, " "
-
-#ifdef DEBUG
-void
-xpc_PrintAllReferencesTo(void *p)
-{
-    /* p must be a JS object */
-    XPCJSRuntime* rt = nsXPConnect::GetRuntimeInstance();
-    JS_DumpHeap(rt->GetJSRuntime(), stdout, nullptr, JSTRACE_OBJECT, p, 0x7fffffff, nullptr);
-}
-#endif
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -3826,36 +3826,33 @@ xpc_NewIDObject(JSContext *cx, JSObject*
 
 extern const nsID*
 xpc_JSObjectToID(JSContext *cx, JSObject* obj);
 
 extern JSBool
 xpc_JSObjectIsID(JSContext *cx, JSObject* obj);
 
 /***************************************************************************/
-// in xpcdebug.cpp
+// in XPCDebug.cpp
 
 extern JSBool
 xpc_DumpJSStack(JSContext* cx, JSBool showArgs, JSBool showLocals,
                 JSBool showThisProps);
 
 // Return a newly-allocated string containing a representation of the
 // current JS stack.  It is the *caller's* responsibility to free this
 // string with JS_smprintf_free().
 extern char*
 xpc_PrintJSStack(JSContext* cx, JSBool showArgs, JSBool showLocals,
                  JSBool showThisProps);
 
 extern JSBool
 xpc_DumpEvalInJSStackFrame(JSContext* cx, uint32_t frameno, const char* text);
 
 extern JSBool
-xpc_DumpJSObject(JSObject* obj);
-
-extern JSBool
 xpc_InstallJSDebuggerKeywordHandler(JSRuntime* rt);
 
 /***************************************************************************/
 
 // Definition of nsScriptError, defined here because we lack a place to put
 // XPCOM objects associated with the JavaScript engine.
 class nsScriptError : public nsIScriptError {
 public: