mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 389988 - showModalDialog should not throw when blocked by the popup blocker (should return null instead). r+sr=jst, a=mconnor over IRC
This commit is contained in:
parent
113e9f840b
commit
b6ec5fdf20
@ -5234,8 +5234,9 @@ nsGlobalWindow::ShowModalDialog(const nsAString& aURI, nsIVariant *aArgs,
|
||||
const nsAString& aOptions,
|
||||
nsIVariant **aRetVal)
|
||||
{
|
||||
nsCOMPtr<nsIDOMWindow> dlgWin;
|
||||
*aRetVal = nsnull;
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> dlgWin;
|
||||
nsAutoString options(NS_LITERAL_STRING("modal=1,status=1"));
|
||||
nsAutoString dialogOptions(aOptions);
|
||||
|
||||
@ -5243,7 +5244,6 @@ nsGlobalWindow::ShowModalDialog(const nsAString& aURI, nsIVariant *aArgs,
|
||||
|
||||
options.AppendLiteral(",scrollbars=1,centerscreen=1,resizable=0");
|
||||
|
||||
|
||||
nsresult rv = OpenInternal(aURI, EmptyString(), options,
|
||||
PR_FALSE, // aDialog
|
||||
PR_TRUE, // aCalledNoScript
|
||||
@ -5252,7 +5252,8 @@ nsGlobalWindow::ShowModalDialog(const nsAString& aURI, nsIVariant *aArgs,
|
||||
GetPrincipal(), // aCalleePrincipal
|
||||
nsnull, // aJSCallerContext
|
||||
getter_AddRefs(dlgWin));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (NS_FAILED(rv))
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> win(do_QueryInterface(dlgWin));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user