зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 16c6e8f4dc2f, because I am dumb
This commit is contained in:
Родитель
0b4382a756
Коммит
beb4258cf0
|
@ -952,18 +952,17 @@ nsDocLoader::GetIsTopLevel(bool *aResult)
|
|||
*aResult = false;
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> window;
|
||||
GetDOMWindow(getter_AddRefs(window));
|
||||
if (window) {
|
||||
nsCOMPtr<nsPIDOMWindow> piwindow = do_QueryInterface(window);
|
||||
NS_ENSURE_STATE(piwindow);
|
||||
nsresult rv = GetDOMWindow(getter_AddRefs(window));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> topWindow;
|
||||
rv = piwindow->GetTop(getter_AddRefs(topWindow));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsPIDOMWindow> piwindow = do_QueryInterface(window);
|
||||
NS_ENSURE_STATE(piwindow);
|
||||
|
||||
*aResult = piwindow == topWindow;
|
||||
}
|
||||
nsCOMPtr<nsIDOMWindow> topWindow;
|
||||
rv = piwindow->GetTop(getter_AddRefs(topWindow));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*aResult = piwindow == topWindow;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче