unnamed windows can't be a named target. bug 278143 r=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@169020 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1971,6 +1971,9 @@ nsDocShell::FindItemWithName(const PRUnichar * aName,
|
||||
// If we don't find one, we return NS_OK and a null result
|
||||
*_retval = nsnull;
|
||||
|
||||
if (!*aName)
|
||||
return NS_OK;
|
||||
|
||||
if (!aRequestor)
|
||||
{
|
||||
nsCOMPtr<nsIDocShellTreeItem> foundItem;
|
||||
@@ -1980,7 +1983,7 @@ nsDocShell::FindItemWithName(const PRUnichar * aName,
|
||||
// for a null aRequestor.
|
||||
|
||||
nsDependentString name(aName);
|
||||
if (name.IsEmpty() || name.LowerCaseEqualsLiteral("_self")) {
|
||||
if (name.LowerCaseEqualsLiteral("_self")) {
|
||||
foundItem = this;
|
||||
}
|
||||
else if (name.LowerCaseEqualsLiteral("_blank") ||
|
||||
@@ -2424,6 +2427,9 @@ nsDocShell::FindChildWithName(const PRUnichar * aName,
|
||||
|
||||
*_retval = nsnull; // if we don't find one, we return NS_OK and a null result
|
||||
|
||||
if (!*aName)
|
||||
return NS_OK;
|
||||
|
||||
nsXPIDLString childName;
|
||||
PRInt32 i, n = mChildList.Count();
|
||||
for (i = 0; i < n; i++) {
|
||||
|
||||
Reference in New Issue
Block a user