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
Родитель b42bfa59ab
Коммит 64dc5effd3
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -2508,7 +2508,8 @@ nsXPConnect::Push(JSContext * cx)
break; break;
} }
} }
if (!runningJS) /* Turning debugging off is immediate even if JS is running */
if (!runningJS || !gDesiredDebugMode)
CheckForDebugMode(mRuntime->GetJSRuntime()); CheckForDebugMode(mRuntime->GetJSRuntime());
} }
@ -2777,6 +2778,8 @@ NS_IMETHODIMP
nsXPConnect::SetDebugModeWhenPossible(PRBool mode) nsXPConnect::SetDebugModeWhenPossible(PRBool mode)
{ {
gDesiredDebugMode = mode; gDesiredDebugMode = mode;
if (!mode)
CheckForDebugMode(mRuntime->GetJSRuntime());
return NS_OK; return NS_OK;
} }