Bug 1662103 - Make .close() a no-op on OOP iframes. r=farre

Differential Revision: https://phabricator.services.mozilla.com/D88983
This commit is contained in:
Henri Sivonen 2020-09-02 09:27:36 +00:00
Родитель 80baa86532
Коммит 345a28490a
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -1835,6 +1835,11 @@ void BrowsingContext::Close(CallerType aCallerType, ErrorResult& aError) {
return;
}
if (IsFrame()) {
// .close() on frames is a no-op.
return;
}
if (GetDOMWindow()) {
nsGlobalWindowOuter::Cast(GetDOMWindow())
->CloseOuter(aCallerType == CallerType::System);