Bug 1398665 - Handle the case when gNeckoChild is null properly in RequestContext::DOMContentLoaded. r=hurley

In child process, during shutdown, it's possible that IsNeckoChild() is true but gNeckoChild is null. When this case happens, we have to early return in RequestContext::DOMContentLoaded() to avoid the asseration failure (MOZ_ASSERT(!IsNeckoChild())) in RequestContext::ScheduleUnblock().
This commit is contained in:
Kershaw Chang 2017-09-12 08:40:00 -04:00
Родитель 1f0f0ebd6c
Коммит c68e094352
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -125,9 +125,11 @@ RequestContext::DOMContentLoaded()
LOG(("RequestContext::DOMContentLoaded %p", this));
if (IsNeckoChild() && gNeckoChild) {
if (IsNeckoChild()) {
// Tailing is not supported on the child process
gNeckoChild->SendRequestContextAfterDOMContentLoaded(mID);
if (gNeckoChild) {
gNeckoChild->SendRequestContextAfterDOMContentLoaded(mID);
}
return NS_OK;
}