зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1591467 - Add a null check when accessing the actor of the browser host in nsFrameLoader::TryRemoteBrowserInternal(). r=smaug
In some cases, the actor of the browser host might be null. So, we need to check before accessing it in order to avoid crashes. Differential Revision: https://phabricator.services.mozilla.com/D50715 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
571019ecae
Коммит
f97686beae
|
@ -2528,7 +2528,10 @@ bool nsFrameLoader::TryRemoteBrowserInternal() {
|
|||
RefPtr<BrowserParent> sameTabGroupAs;
|
||||
if (auto* host = BrowserHost::GetFrom(parentDocShell->GetOpener())) {
|
||||
openerContentParent = host->GetContentParent();
|
||||
openerContentPrincipal = host->GetActor()->GetContentPrincipal();
|
||||
BrowserParent* openerBrowserParent = host->GetActor();
|
||||
if (openerBrowserParent) {
|
||||
openerContentPrincipal = openerBrowserParent->GetContentPrincipal();
|
||||
}
|
||||
}
|
||||
|
||||
// <iframe mozbrowser> gets to skip these checks.
|
||||
|
|
Загрузка…
Ссылка в новой задаче