зеркало из https://github.com/mozilla/pjs.git
Bug 403574 - ""ASSERTION: Infinite loop! Calling EnsureScriptEnvironment() from within EnsureScriptEnvironment()!" with XBL, <frame>" [p=jst@mozilla.org (Johnny Stenback [jst]) r+sr=bzbarsky (DEBUG builds only)]
This commit is contained in:
Родитель
24f626f9cd
Коммит
e827e18b11
|
@ -8786,6 +8786,25 @@ nsDocShell::GetRootScrollableView(nsIScrollableView ** aOutScrollView)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
class nsDebugAutoBoolTrueSetter
|
||||
{
|
||||
public:
|
||||
nsDebugAutoBoolTrueSetter(PRBool *aBool)
|
||||
: mBool(aBool)
|
||||
{
|
||||
*mBool = PR_TRUE;
|
||||
}
|
||||
|
||||
~nsDebugAutoBoolTrueSetter()
|
||||
{
|
||||
*mBool = PR_FALSE;
|
||||
}
|
||||
protected:
|
||||
PRBool *mBool;
|
||||
};
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::EnsureScriptEnvironment()
|
||||
{
|
||||
|
@ -8803,7 +8822,7 @@ nsDocShell::EnsureScriptEnvironment()
|
|||
|
||||
// Yeah, this isn't re-entrant safe, but that's ok since if we
|
||||
// re-enter this method, we'll infinitely loop...
|
||||
mInEnsureScriptEnv = PR_TRUE;
|
||||
nsDebugAutoBoolTrueSetter boolSetter(&mInEnsureScriptEnv);
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIDOMScriptObjectFactory> factory =
|
||||
|
@ -8837,10 +8856,6 @@ nsDocShell::EnsureScriptEnvironment()
|
|||
rv = mScriptGlobal->EnsureScriptEnvironment(nsIProgrammingLanguage::JAVASCRIPT);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
#ifdef DEBUG
|
||||
mInEnsureScriptEnv = PR_FALSE;
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче