Using the heap too early can cause crashes, in particular when certain exploit mitigations cause the application verifier DLL to load. This is a cherry-pick and rebase of chromium commit: f1abab03e72635bf675f41715faadd78579086fc Differential Revision: https://phabricator.services.mozilla.com/D249042