Bug 1673617 - Create BrowsingContext::mChildSessionHistory more aggressively, r=nika

Differential Revision: https://phabricator.services.mozilla.com/D100348
This commit is contained in:
Randell Jesup 2021-02-01 22:57:12 +00:00
Родитель 8f5a2d3c87
Коммит 140a416459
2 изменённых файлов: 4 добавлений и 4 удалений

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

@ -2519,6 +2519,10 @@ bool nsFrameLoader::TryRemoteBrowserInternal() {
return false;
}
if (mPendingBrowsingContext->IsTop()) {
mPendingBrowsingContext->InitSessionHistory();
}
// <iframe mozbrowser> gets to skip these checks.
// iframes for JS plugins also get to skip these checks. We control the URL
// that gets loaded, but the load is triggered from the document containing

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

@ -147,10 +147,6 @@ already_AddRefed<nsWebBrowser> nsWebBrowser::Create(
// handler that always gets called (even for subframes) for any bubbling
// event.
if (aBrowsingContext->IsTop()) {
aBrowsingContext->InitSessionHistory();
}
nsresult rv = docShell->InitWindow(nullptr, docShellParentWidget, 0, 0, 0, 0);
if (NS_WARN_IF(NS_FAILED(rv))) {
return nullptr;