don't name windows using reserved target names. bug 208862 r=jag,jst,mscott
git-svn-id: svn://10.0.0.236/trunk@143628 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
d5a2470f0f
commit
30cbe64cc1
@ -672,7 +672,12 @@ nsWindowWatcher::OpenWindowJS(nsIDOMWindow *aParent,
|
||||
}
|
||||
}
|
||||
|
||||
newDocShellItem->SetName(nameSpecified ? name.get() : nsnull);
|
||||
/* allow an extant window to keep its name (important for cases like
|
||||
_self where the given name is different (and invalid)). also _blank
|
||||
is not a window name. */
|
||||
if (windowIsNew)
|
||||
newDocShellItem->SetName(nameSpecified && !name.EqualsIgnoreCase("_blank") ?
|
||||
name.get() : nsnull);
|
||||
|
||||
nsCOMPtr<nsIDocShell> newDocShell(do_QueryInterface(newDocShellItem));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user