Bug 1291324 - Call mozilla::TimeStamp::ProcessCreation in JS_Init to ensure getting Promise timestamps is infallible. r=jonco

We already call PRMJ_NowInit for similar reasons.
This commit is contained in:
Till Schneidereit 2016-08-12 15:53:13 +02:00
parent 1559a95bbf
commit 02dfa23824

View File

@ -79,6 +79,13 @@ JS::detail::InitWithFailureDiagnostic(bool isDebugBuild)
PRMJ_NowInit();
// The first invocation of `ProcessCreation` creates a temporary thread
// and crashes if that fails, i.e. because we're out of memory. To prevent
// that from happening at some later time, get it out of the way during
// startup.
bool ignored;
mozilla::TimeStamp::ProcessCreation(ignored);
#ifdef DEBUG
CheckMessageParameterCounts();
#endif