зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1642425: Part 3 - Fix nsDocLoader::GetIsTopLevel under Fission. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D77702
This commit is contained in:
Родитель
316de88922
Коммит
79760bfbb6
|
@ -1018,18 +1018,8 @@ nsDocLoader::GetInnerDOMWindowID(uint64_t* aResult) {
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsDocLoader::GetIsTopLevel(bool* aResult) {
|
||||
*aResult = false;
|
||||
|
||||
nsCOMPtr<mozIDOMWindowProxy> window;
|
||||
GetDOMWindow(getter_AddRefs(window));
|
||||
if (window) {
|
||||
nsCOMPtr<nsPIDOMWindowOuter> piwindow = nsPIDOMWindowOuter::From(window);
|
||||
NS_ENSURE_STATE(piwindow);
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowOuter> topWindow = piwindow->GetInProcessTop();
|
||||
*aResult = piwindow == topWindow;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(this);
|
||||
*aResult = docShell && docShell->GetBrowsingContext()->IsTop();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче