Bug 207617 This URL crashes Mozilla every time [@ js_CompareStrings]

r=bryner sr=bz
This commit is contained in:
timeless%mozdev.org 2003-07-28 10:59:54 +00:00
Родитель c67fdc7bbc
Коммит eda704ab1f
1 изменённых файлов: 7 добавлений и 6 удалений

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

@ -450,6 +450,7 @@ protected:
// A queue of binding attached event handlers that are awaiting // A queue of binding attached event handlers that are awaiting
// execution. // execution.
nsCOMPtr<nsISupportsArray> mAttachedQueue; nsCOMPtr<nsISupportsArray> mAttachedQueue;
PRBool mProcessingAttachedQueue;
}; };
// Implementation ///////////////////////////////////////////////////////////////// // Implementation /////////////////////////////////////////////////////////////////
@ -461,15 +462,13 @@ NS_IMPL_ISUPPORTS3(nsBindingManager, nsIBindingManager, nsIStyleRuleSupplier, ns
// Constructors/Destructors // Constructors/Destructors
nsBindingManager::nsBindingManager(void) nsBindingManager::nsBindingManager(void)
: mProcessingAttachedQueue(PR_FALSE)
{ {
mBindingTable.ops = nsnull; mBindingTable.ops = nsnull;
mContentListTable.ops = nsnull; mContentListTable.ops = nsnull;
mAnonymousNodesTable.ops = nsnull; mAnonymousNodesTable.ops = nsnull;
mInsertionParentTable.ops = nsnull; mInsertionParentTable.ops = nsnull;
mWrapperTable.ops = nsnull; mWrapperTable.ops = nsnull;
mAttachedQueue = nsnull;
} }
nsBindingManager::~nsBindingManager(void) nsBindingManager::~nsBindingManager(void)
@ -941,12 +940,13 @@ nsBindingManager::ClearAttachedQueue()
NS_IMETHODIMP NS_IMETHODIMP
nsBindingManager::ProcessAttachedQueue() nsBindingManager::ProcessAttachedQueue()
{ {
if (!mAttachedQueue) if (!mAttachedQueue || mProcessingAttachedQueue)
return NS_OK; return NS_OK;
mProcessingAttachedQueue = PR_TRUE;
PRUint32 count; PRUint32 count;
mAttachedQueue->Count(&count); while (NS_SUCCEEDED(mAttachedQueue->Count(&count)) && count) {
for (PRUint32 i = 0; i < count; i++) {
nsCOMPtr<nsISupports> supp; nsCOMPtr<nsISupports> supp;
mAttachedQueue->GetElementAt(0, getter_AddRefs(supp)); mAttachedQueue->GetElementAt(0, getter_AddRefs(supp));
mAttachedQueue->RemoveElementAt(0); mAttachedQueue->RemoveElementAt(0);
@ -956,6 +956,7 @@ nsBindingManager::ProcessAttachedQueue()
binding->ExecuteAttachedHandler(); binding->ExecuteAttachedHandler();
} }
mProcessingAttachedQueue = PR_FALSE;
ClearAttachedQueue(); ClearAttachedQueue();
return NS_OK; return NS_OK;
} }