Skip to content

Commit c36151e

Browse files
cpojerfacebook-github-bot
authored andcommitted
Do not overwrite Object.freeze
Summary: Now that React Native ships with a newer version of JSC, we do not need this code to wrap `Object.freeze` any longer. Reviewed By: mmmulani Differential Revision: D14779239 fbshipit-source-id: 1a6e1a9c7f4312572bd08ba604fa8c9d6b1927e1
1 parent d9a8222 commit c36151e

File tree

4 files changed

+0
-46
lines changed

4 files changed

+0
-46
lines changed

Libraries/Core/__tests__/MapAndSetPolyfills-test.js

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ const {freeze, seal, preventExtensions} = Object;
1414

1515
function setup() {
1616
jest.setMock('../../vendor/core/_shouldPolyfillES6Collection', () => true);
17-
jest.unmock('_wrapObjectFreezeAndFriends');
18-
require('_wrapObjectFreezeAndFriends');
1917
}
2018

2119
function cleanup() {

Libraries/Core/polyfillES6Collections.js

-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ const {polyfillGlobal} = require('PolyfillFunctions');
1818
*/
1919
const _shouldPolyfillCollection = require('_shouldPolyfillES6Collection');
2020
if (_shouldPolyfillCollection('Map')) {
21-
require('_wrapObjectFreezeAndFriends');
2221
polyfillGlobal('Map', () => require('Map'));
2322
}
2423
if (_shouldPolyfillCollection('Set')) {
25-
require('_wrapObjectFreezeAndFriends');
2624
polyfillGlobal('Set', () => require('Set'));
2725
}

Libraries/vendor/core/Map.js

-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ module.exports = (function(global, undefined) {
2626
return global.Map;
2727
}
2828

29-
// In case this module has not already been evaluated, import it now.
30-
require('./_wrapObjectFreezeAndFriends');
31-
3229
const hasOwn = Object.prototype.hasOwnProperty;
3330

3431
/**

Libraries/vendor/core/_wrapObjectFreezeAndFriends.js

-39
This file was deleted.

0 commit comments

Comments
 (0)