Bug 1021124 - Bail out of InterruptCallback if we're too early in startup. r=bz

This commit is contained in:
Bobby Holley 2014-06-05 12:29:42 -07:00
Родитель f26166e672
Коммит 8ff8fc55e2
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -1386,6 +1386,11 @@ XPCJSRuntime::InterruptCallback(JSContext *cx)
return true;
}
// Sometimes we get called back during XPConnect initialization, before Gecko
// has finished bootstrapping. Avoid crashing in nsContentUtils below.
if (!nsContentUtils::IsInitialized())
return true;
// This is at least the second interrupt callback we've received since
// returning to the event loop. See how long it's been, and what the limit
// is.