зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1520037 - Reuse 'BrowsingContext::TopLevelBrowsingContext()'. r=nika
GetTop() can simply wrap the result from TopLevelBrowsingContext(). Differential Revision: https://phabricator.services.mozilla.com/D16511 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
1558607307
Коммит
6b59e31c9d
|
@ -424,12 +424,7 @@ void BrowsingContext::Blur(ErrorResult& aError) {
|
|||
Nullable<WindowProxyHolder> BrowsingContext::GetTop(ErrorResult& aError) {
|
||||
// We never return null or throw an error, but the implementation in
|
||||
// nsGlobalWindow does and we need to use the same signature.
|
||||
BrowsingContext* bc = this;
|
||||
BrowsingContext* parent;
|
||||
while ((parent = bc->mParent)) {
|
||||
bc = parent;
|
||||
}
|
||||
return WindowProxyHolder(bc);
|
||||
return WindowProxyHolder(TopLevelBrowsingContext());
|
||||
}
|
||||
|
||||
void BrowsingContext::GetOpener(JSContext* aCx,
|
||||
|
|
Загрузка…
Ссылка в новой задаче