Fix for bug 659581 (Clear debugger activation callback after calling it). r=brendan.
authorPeter Van der Beken <peterv@propagandism.org>
Wed, 25 May 2011 10:46:51 +0200
changeset 71822 fbd4e4a84bb923b32cad64ba2cce2317c89d437f
parent 71821 aee9017b0b4fb4e5c962d83d0ae8d038a2df62f0
child 71823 c36e6d83d89d89711381d36aff4172c277f3c032
push idunknown
push userunknown
push dateunknown
reviewersbrendan
bugs659581
milestone7.0a1
Fix for bug 659581 (Clear debugger activation callback after calling it). r=brendan.
js/jsd/jsd_xpc.cpp
--- a/js/jsd/jsd_xpc.cpp
+++ b/js/jsd/jsd_xpc.cpp
@@ -2668,18 +2668,20 @@ jsdService::ActivateDebugger (JSRuntime 
     else
         JSD_ClearFunctionHook (mCx);
     mOn = PR_TRUE;
 
 #ifdef DEBUG
     printf ("+++ JavaScript debugging hooks installed.\n");
 #endif
 
-    if (mActivationCallback)
-        return mActivationCallback->OnDebuggerActivated();
+    nsCOMPtr<jsdIActivationCallback> activationCallback;
+    mActivationCallback.swap(activationCallback);
+    if (activationCallback)
+        return activationCallback->OnDebuggerActivated();
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 jsdService::Off (void)
 {
     if (!mOn)