Bug 1401863 - Handle the case when gNeckoChild is null properly in RequestContext::BeginLoad. r=mayhemer

In child process, during shutdown, it's possible that IsNeckoChild() is true but gNeckoChild is null. When this case happens, it is necessary to return early in RequestContext::BeginLoad to avoid modifying mAfterDOMContentLoaded.
This commit is contained in:
Kershaw Chang 2017-09-26 19:30:00 -04:00
Родитель f402862a8f
Коммит 36e139a775
1 изменённых файлов: 4 добавлений и 2 удалений

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

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