Bug 100952. Don't allow re-entrant notifications while building. r=sspitzer, sr=hyatt, a=asa
This commit is contained in:
Родитель
ac01948d88
Коммит
d2cdf52b6f
|
@ -1771,6 +1771,12 @@ nsXULContentBuilder::CreateContents(nsIContent* aElement)
|
|||
|
||||
NS_ASSERTION(IsElementInWidget(aElement), "element not managed by this template builder");
|
||||
|
||||
// Prevent re-entrancy while we're creating an element's children
|
||||
if (mIsBuilding)
|
||||
return NS_OK;
|
||||
|
||||
AutoLatch latch(&mIsBuilding);
|
||||
|
||||
return CreateTemplateAndContainerContents(aElement, nsnull /* don't care */, nsnull /* don't care */);
|
||||
}
|
||||
|
||||
|
|
|
@ -941,6 +941,12 @@ nsXULOutlinerBuilder::Rebuild()
|
|||
if (! mRoot)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
// Forbid re-entrancy while rebuilding
|
||||
if (mIsBuilding)
|
||||
return NS_OK;
|
||||
|
||||
AutoLatch latch(&mIsBuilding);
|
||||
|
||||
nsresult rv;
|
||||
|
||||
mRows.Clear();
|
||||
|
|
|
@ -941,6 +941,12 @@ nsXULOutlinerBuilder::Rebuild()
|
|||
if (! mRoot)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
// Forbid re-entrancy while rebuilding
|
||||
if (mIsBuilding)
|
||||
return NS_OK;
|
||||
|
||||
AutoLatch latch(&mIsBuilding);
|
||||
|
||||
nsresult rv;
|
||||
|
||||
mRows.Clear();
|
||||
|
|
Загрузка…
Ссылка в новой задаче