Make temporary debug-only logging code not crash. r=sdwilsh
authorJesse Ruderman <jruderman@gmail.com>
Tue, 21 Apr 2009 16:57:19 -0700
changeset 27591 5617c22ea9aca301a6515dab91ab9a7ab7bb88dd
parent 27590 6a452e522e0775c1993c41085fb2851acd3aaf5b
child 27592 02d8a0a5f71f8918b174d01ebdaf775261478b54
push id6635
push userjruderman@mozilla.com
push dateTue, 21 Apr 2009 23:58:39 +0000
treeherdermozilla-central@5617c22ea9ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssdwilsh
milestone1.9.2a1pre
Make temporary debug-only logging code not crash. r=sdwilsh
xpcom/io/nsStreamUtils.cpp
--- a/xpcom/io/nsStreamUtils.cpp
+++ b/xpcom/io/nsStreamUtils.cpp
@@ -96,17 +96,17 @@ public:
 
         nsresult rv =
             mTarget->Dispatch(this, NS_DISPATCH_NORMAL);
         if (NS_FAILED(rv)) {
             NS_WARNING("Dispatch failed");
 #ifdef DEBUG
             (void)fprintf(stdout,
                           "### mTarget (%p) may not be accepting events!\n",
-                          mTarget);
+                          mTarget.get());
 #endif
             return NS_ERROR_FAILURE;
         }
 
         return NS_OK;
     }
 
     NS_IMETHOD Run()
@@ -180,17 +180,17 @@ public:
 
         nsresult rv =
             mTarget->Dispatch(this, NS_DISPATCH_NORMAL);
         if (NS_FAILED(rv)) {
             NS_WARNING("PostEvent failed");
 #ifdef DEBUG
             (void)fprintf(stdout,
                           "### mTarget (%p) may not be accepting events!\n",
-                          mTarget);
+                          mTarget.get());
 #endif
             return NS_ERROR_FAILURE;
         }
 
         return NS_OK;
     }
 
     NS_IMETHOD Run()