Bug 1554065. Fix the requestor nsDocShell::DoFindItemWithName passes to TabGroup::FindItemWithName. r=nika

The requestor should be ourselves: the toplevel docshell that the tabgroup does
not need to look in when doing the search.

Differential Revision: https://phabricator.services.mozilla.com/D32422

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Boris Zbarsky 2019-05-24 19:40:44 +00:00
Родитель f9cb4ec2b6
Коммит 439bd768ad
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -3071,9 +3071,9 @@ nsresult nsDocShell::DoFindItemWithName(const nsAString& aName,
// NOTE: Could use GetSameTypeParent if the issues described in bug 1310344
// are fixed.
if (!GetIsMozBrowser() && parentAsTreeItem->ItemType() == mItemType) {
return parentAsTreeItem->FindItemWithName(
aName, static_cast<nsIDocShellTreeItem*>(this), aOriginalRequestor,
/* aSkipTabGroup = */ false, aResult);
return parentAsTreeItem->FindItemWithName(aName, this, aOriginalRequestor,
/* aSkipTabGroup = */ false,
aResult);
}
}
@ -3082,7 +3082,7 @@ nsresult nsDocShell::DoFindItemWithName(const nsAString& aName,
nsCOMPtr<nsPIDOMWindowOuter> window = GetWindow();
if (window && !aSkipTabGroup) {
RefPtr<mozilla::dom::TabGroup> tabGroup = window->TabGroup();
tabGroup->FindItemWithName(aName, aRequestor, aOriginalRequestor, aResult);
tabGroup->FindItemWithName(aName, this, aOriginalRequestor, aResult);
}
return NS_OK;