From 64dc5effd325f3a5cfe82de761c7e5f1a37f3f7f Mon Sep 17 00:00:00 2001 From: Steve Fink Date: Mon, 24 Jan 2011 13:24:52 -0800 Subject: [PATCH] Bug 626830 - XPConnect should turn debugging off immediately, without waiting for a quiescent stack --HG-- extra : rebase_source : 62a7bb8024313841b4c40c86ccaedd1ae9f56ad1 --- js/src/xpconnect/src/nsXPConnect.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/src/xpconnect/src/nsXPConnect.cpp b/js/src/xpconnect/src/nsXPConnect.cpp index 4414621c3374..94092a438c67 100644 --- a/js/src/xpconnect/src/nsXPConnect.cpp +++ b/js/src/xpconnect/src/nsXPConnect.cpp @@ -2508,7 +2508,8 @@ nsXPConnect::Push(JSContext * cx) break; } } - if (!runningJS) + /* Turning debugging off is immediate even if JS is running */ + if (!runningJS || !gDesiredDebugMode) CheckForDebugMode(mRuntime->GetJSRuntime()); } @@ -2777,6 +2778,8 @@ NS_IMETHODIMP nsXPConnect::SetDebugModeWhenPossible(PRBool mode) { gDesiredDebugMode = mode; + if (!mode) + CheckForDebugMode(mRuntime->GetJSRuntime()); return NS_OK; }