mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 434035 - "Crash [@ nsGlobalWindow::FindInternal] when doing find on a deleted window" [r+sr=jst]
This commit is contained in:
parent
5f33a71e90
commit
260b020b60
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user