Bug 434035 - "Crash [@ nsGlobalWindow::FindInternal] when doing find on a deleted window" [r+sr=jst]

This commit is contained in:
Martijn Wargers ext:(%20/%20Doug%20Turner%20%3Cdoug.turner%40gmail.com%3E) 2008-12-14 22:20:37 -08:00
parent 5f33a71e90
commit 260b020b60

View File

@ -3874,6 +3874,9 @@ nsGlobalWindow::EnsureReflowFlushAndPaint()
NS_ASSERTION(mDocShell, "EnsureReflowFlushAndPaint() called with no "
"docshell!");
if (!mDocShell)
return;
nsCOMPtr<nsIPresShell> presShell;
mDocShell->GetPresShell(getter_AddRefs(presShell));
@ -5930,6 +5933,8 @@ nsGlobalWindow::ShowModalDialog(const nsAString& aURI, nsIVariant *aArgs,
{
*aRetVal = nsnull;
NS_ENSURE_TRUE(mDocShell, NS_ERROR_FAILURE);
nsCOMPtr<nsIDOMWindow> dlgWin;
nsAutoString options(NS_LITERAL_STRING("-moz-internal-modal=1,status=1"));
@ -6037,6 +6042,7 @@ nsGlobalWindow::Find(const nsAString& aStr, PRBool aCaseSensitive,
*aDidFind = PR_FALSE;
nsCOMPtr<nsIWebBrowserFind> finder(do_GetInterface(mDocShell));
NS_ENSURE_TRUE(finder, NS_ERROR_FAILURE);
// Set the options of the search
rv = finder->SetSearchString(PromiseFlatString(aStr).get());