Bug 626830 - XPConnect should turn debugging off immediately, without waiting for a quiescent stack

--HG--
extra : rebase_source : 62a7bb8024313841b4c40c86ccaedd1ae9f56ad1
This commit is contained in:
Steve Fink 2011-01-24 13:24:52 -08:00
parent b42bfa59ab
commit 64dc5effd3

View File

@ -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;
}