Reviewed By: threepointone

Differential Revision: D15582763

fbshipit-source-id: 3185a578945a725083b08050880758c623b13875
This commit is contained in:
Chris Blappert 2019-06-21 10:55:40 -07:00 коммит произвёл Facebook Github Bot
Родитель e81c1e3c7a
Коммит 6f310b5553
1 изменённых файлов: 0 добавлений и 4 удалений

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

@ -46,15 +46,11 @@ const FrameRateLogger = {
);
}
if (NativeModules.FrameRateLogger) {
// Freeze the object to avoid the prepack warning (PP0017) about leaking
// unfrozen objects.
// Needs to clone the object first to avoid modifying the argument.
const optionsClone = {
debug: !!options.debug,
reportStackTraces: !!options.reportStackTraces,
};
Object.freeze(optionsClone);
Object.seal(optionsClone);
NativeModules.FrameRateLogger.setGlobalOptions(optionsClone);
}
},