Summary: Moves initialization of `Map` and `Set` polyfills to the top of `InitializeCore` to avoid problems with JSC versions that don’t accept (or silently ignore) iterables as constructor arguments.

Reviewed By: mjesun

Differential Revision: D6185632

fbshipit-source-id: 3abe4baeb3a08c328d8c6b3bb1b2e01716c2c95c
This commit is contained in:
David Aurelio 2017-10-30 11:49:22 -07:00 коммит произвёл Facebook Github Bot
Родитель a5550a56ea
Коммит 008e549933
1 изменённых файлов: 9 добавлений и 9 удалений

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

@ -38,6 +38,15 @@ if (global.window === undefined) {
const defineLazyObjectProperty = require('defineLazyObjectProperty');
// Set up collections
const _shouldPolyfillCollection = require('_shouldPolyfillES6Collection');
if (_shouldPolyfillCollection('Map')) {
polyfillGlobal('Map', () => require('Map'));
}
if (_shouldPolyfillCollection('Set')) {
polyfillGlobal('Set', () => require('Set'));
}
/**
* Sets an object's property. If a property with the same name exists, this will
* replace it but maintain its descriptor configuration. The property will be
@ -120,15 +129,6 @@ if (!global.__fbDisableExceptionsManager) {
const ReactNativeVersionCheck = require('ReactNativeVersionCheck');
ReactNativeVersionCheck.checkVersions();
// Set up collections
const _shouldPolyfillCollection = require('_shouldPolyfillES6Collection');
if (_shouldPolyfillCollection('Map')) {
polyfillGlobal('Map', () => require('Map'));
}
if (_shouldPolyfillCollection('Set')) {
polyfillGlobal('Set', () => require('Set'));
}
// Set up Promise
// The native Promise implementation throws the following error:
// ERROR: Event loop not supported.