Bug 1459701 - Don't crash if ContentParent::UnregisterRemoteFrame is called with a ContentParentId that doesn't exist; r=jimm

MozReview-Commit-ID: AUnuR6W2S5S

--HG--
extra : rebase_source : 3b96e03acb419169782ee0436adb225900a5a182
extra : source : d95af3da7cc6f39f0404622b2293c55dc13265c8
This commit is contained in:
Alex Gaynor 2018-04-25 11:35:56 -04:00
Родитель 613e18b048
Коммит 804ccc2c59
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -4408,6 +4408,10 @@ ContentParent::UnregisterRemoteFrame(const TabId& aTabId,
ContentProcessManager* cpm = ContentProcessManager::GetSingleton();
ContentParent* cp = cpm->GetContentProcessById(aCpId);
if (!cp) {
return;
}
cp->NotifyTabDestroyed(aTabId, aMarkedDestroying);
ContentProcessManager::GetSingleton()->UnregisterRemoteFrame(aCpId, aTabId);