Bug 937157, part 1 - Remove some ancient or unused debugging #defines. r=bholley
authorAndrew McCreight <continuation@gmail.com>
Sun, 17 Nov 2013 14:46:57 -0800
changeset 155090 3df299e18f2974655f6adfd7ca9b74b663ce09ce
parent 155089 a3665e0d406618a62cb3dcdacb205821d0833e99
child 155091 c0c75fb6ff17be51bb762421f4aaab32466baaf2
push id25662
push useremorley@mozilla.com
push dateMon, 18 Nov 2013 10:53:03 +0000
treeherdermozilla-central@59f6274ce8f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs937157
milestone28.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 937157, part 1 - Remove some ancient or unused debugging #defines. r=bholley
js/xpconnect/src/XPCShellImpl.cpp
js/xpconnect/src/XPCWrappedJS.cpp
js/xpconnect/src/XPCWrappedNative.cpp
js/xpconnect/src/XPCWrappedNativeJSOps.cpp
js/xpconnect/src/xpcprivate.h
--- a/js/xpconnect/src/XPCShellImpl.cpp
+++ b/js/xpconnect/src/XPCShellImpl.cpp
@@ -1239,19 +1239,16 @@ NS_IMPL_ISUPPORTS1(nsXPCFunctionThisTran
 nsXPCFunctionThisTranslator::nsXPCFunctionThisTranslator()
 {
   /* member initializers and constructor code */
 }
 
 nsXPCFunctionThisTranslator::~nsXPCFunctionThisTranslator()
 {
   /* destructor code */
-#ifdef DEBUG_jband
-    printf("destroying nsXPCFunctionThisTranslator\n");
-#endif
 }
 
 /* nsISupports TranslateThis (in nsISupports aInitialThis); */
 NS_IMETHODIMP
 nsXPCFunctionThisTranslator::TranslateThis(nsISupports *aInitialThis,
                                            nsISupports **_retval)
 {
     NS_IF_ADDREF(aInitialThis);
--- a/js/xpconnect/src/XPCWrappedJS.cpp
+++ b/js/xpconnect/src/XPCWrappedJS.cpp
@@ -424,23 +424,16 @@ nsXPCWrappedJS::nsXPCWrappedJS(JSContext
     : mJSObj(aJSObj),
       mClass(aClass),
       mRoot(root ? root : this),
       mNext(nullptr),
       mOuter(root ? nullptr : aOuter),
       mMainThread(NS_IsMainThread()),
       mMainThreadOnly(root && root->mMainThreadOnly)
 {
-#ifdef DEBUG_stats_jband
-    static int count = 0;
-    static const int interval = 10;
-    if (0 == (++count % interval))
-        printf("//////// %d instances of nsXPCWrappedJS created\n", count);
-#endif
-
     MOZ_ASSERT_IF(mMainThreadOnly, mMainThread);
 
     InitStub(GetClass()->GetIID());
 
     // intentionally do double addref - see Release().
     NS_ADDREF_THIS();
     NS_ADDREF_THIS();
     NS_ADDREF(aClass);
--- a/js/xpconnect/src/XPCWrappedNative.cpp
+++ b/js/xpconnect/src/XPCWrappedNative.cpp
@@ -3237,21 +3237,16 @@ void DEBUG_ReportShadowedMembers(XPCNati
     static int nextSeenSet = 0;
     static const int MAX_SEEN_SETS = 128;
     static XPCNativeSet* SeenSets[MAX_SEEN_SETS];
     for (int seen = 0; seen < MAX_SEEN_SETS; seen++)
         if (set == SeenSets[seen])
             return;
     SeenSets[nextSeenSet] = set;
 
-#ifdef off_DEBUG_jband
-    static int seenCount = 0;
-    printf("--- adding SeenSets[%d] = 0x%p\n", nextSeenSet, set);
-    DEBUG_PrintShadowObjectInfo(nullptr, set, wrapper, proto);
-#endif
     int localNext = nextSeenSet+1;
     nextSeenSet = localNext < MAX_SEEN_SETS ? localNext : 0;
 
     XPCNativeScriptableInfo* si = wrapper ?
             wrapper->GetScriptableInfo() :
             proto->GetScriptableInfo();
 
     // We just want to skip some classes...
--- a/js/xpconnect/src/XPCWrappedNativeJSOps.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeJSOps.cpp
@@ -382,24 +382,16 @@ DefinePropertyIfFound(XPCCallContext& cc
          scriptableInfo->GetFlags().DontEnumQueryInterface() &&
          id == rt->GetStringID(XPCJSRuntime::IDX_QUERY_INTERFACE)))
         propFlags &= ~JSPROP_ENUMERATE;
 
     RootedValue funval(ccx);
     if (!member->NewFunctionObject(ccx, iface, obj, funval.address()))
         return false;
 
-#ifdef off_DEBUG_jband
-    {
-        static int cloneCount = 0;
-        if (!(++cloneCount%10))
-            printf("<><><> %d cloned functions created\n", cloneCount);
-    }
-#endif
-
     if (member->IsMethod()) {
         AutoResolveName arn(ccx, id);
         if (resolved)
             *resolved = true;
         return JS_DefinePropertyById(ccx, obj, id, funval, nullptr, nullptr,
                                      propFlags);
     }
 
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -173,44 +173,33 @@
 
 #include "nsINode.h"
 
 /***************************************************************************/
 // Compile time switches for instrumentation and stuff....
 
 // Note that one would not normally turn *any* of these on in a non-DEBUG build.
 
-#if defined(DEBUG_jband) || defined(DEBUG_jst) || defined(DEBUG_dbradley) || defined(DEBUG_shaver_no) || defined(DEBUG_timeless)
+#if defined(DEBUG_jst) || defined(DEBUG_timeless)
 #define DEBUG_xpc_hacker
 #endif
 
-#if defined(DEBUG_brendan)
-#define DEBUG_XPCNativeWrapper 1
-#endif
-
-#ifdef DEBUG
-#define XPC_DETECT_LEADING_UPPERCASE_ACCESS_ERRORS
-#endif
-
 #if defined(DEBUG_xpc_hacker)
 #define XPC_DUMP_AT_SHUTDOWN
 #define XPC_TRACK_WRAPPER_STATS
 #define XPC_TRACK_SCOPE_STATS
 #define XPC_TRACK_PROTO_STATS
-#define XPC_TRACK_DEFERRED_RELEASES
 #define XPC_CHECK_WRAPPERS_AT_SHUTDOWN
 #define XPC_REPORT_SHADOWED_WRAPPED_NATIVE_MEMBERS
 #define XPC_CHECK_CLASSINFO_CLAIMS
 #if defined(DEBUG_jst)
 #define XPC_ASSERT_CLASSINFO_CLAIMS
 #endif
-//#define DEBUG_stats_jband 1
 //#define XPC_REPORT_NATIVE_INTERFACE_AND_SET_FLUSHING
 //#define XPC_REPORT_JSCLASS_FLUSHING
-//#define XPC_TRACK_AUTOMARKINGPTR_STATS
 #endif
 
 #if defined(DEBUG_dbaron) || defined(DEBUG_bzbarsky) // only part of DEBUG_xpc_hacker!
 #define XPC_DUMP_AT_SHUTDOWN
 #endif
 
 /***************************************************************************/
 // conditional forward declarations....