react-native/Libraries
Cameron Hunter bdf5adc40b Ensure that existing properties are configurable before redefining
Summary:
`Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js` attempts to setup global variables typical in most JavaScript environments. It finds the previous property value using `Object.getOwnPropertyDescriptor` and preserves it as `original[PropertyName]` (if it existed), it then redefines the property using `Object.defineProperty`.

Properties may only be redefined if the property descriptor specifies that it is configurable ([MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor)). Attempting to redefine an non-configurable property will result in an error: `TypeError: Cannot redefine property: [PropertyName]`.

Not all properties being setup in `InitializeJavaScriptAppEngine.js` are necessarily configurable in the target environment.
Closes https://github.com/facebook/react-native/pull/9244

Differential Revision: D3679683

fbshipit-source-id: cd3398ef2cdf38e58c58862e64b159951c2b22c2
2016-08-05 21:58:29 -07:00
..
ART Move font helpers to RCTFont 2016-08-05 12:44:20 -07:00
ActionSheetIOS Update RCTActionSheetManager.m 2016-06-04 16:28:19 -07:00
AdSupport Text highlighting on iOS 2015-07-24 08:41:58 -08:00
Animated Support for spring animations 2016-08-05 12:14:06 -07:00
AppRegistry Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
AppState iOS: Provide correct initial value for AppState.currentState 2016-07-12 23:28:22 -07:00
BatchedBridge #15 Add a button in devtools to start/stop the Sampling Profiler 2016-08-02 11:14:06 -07:00
BugReporting Unrevert D3518381 2016-07-06 12:58:41 -07:00
CameraRoll Automated changes to remove implicit capture of self in blocks: Libraries/FBReactKit/BUCK 2016-07-07 12:44:14 -07:00
Components mediaPlaybackRequiresUserAction default value is true,not `false` 2016-08-03 17:43:49 -07:00
CustomComponents NavigationExperimental: Stop using absolute position for NavigationHeader. 2016-08-04 15:28:30 -07:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Devtools Get server host in setupDevtools for Android 2016-07-19 05:58:29 -07:00
EventEmitter Fixes EventEmitter#once arguments not getting passed to the listener 2016-06-28 16:13:21 -07:00
Experimental Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
Fetch Fixed what fetch.js exports 2016-07-14 11:13:27 -07:00
Geolocation Update RCTNetworking, RCTNetInfo and RCTLocationManager to use new events system 2016-05-25 04:28:36 -07:00
Image - Update remote image example 2016-08-05 08:58:32 -07:00
Inspector Enable websocket interception in RN network inspector tool 2016-08-02 08:28:39 -07:00
Interaction PanResponder should not hold stale handle for interaction. 2016-07-15 11:58:31 -07:00
JavaScriptAppEngine Ensure that existing properties are configurable before redefining 2016-08-05 21:58:29 -07:00
LayoutAnimation Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
Linking Hook up Android intent to Linking.js #7079 2016-06-05 18:58:24 -07:00
LinkingIOS Updated Linking and PushNotificationIOS modules to use NativeEventEmitter 2016-05-27 10:28:23 -07:00
Modal Fix Popover problem for RTL 1/n 2016-07-19 10:43:29 -07:00
NativeAnimation InterpolationAnimatedNode fromDoubleArray should support the string type 2016-08-05 02:58:30 -07:00
NavigationExperimental Fix navigation card stack pan responder 2016-07-25 11:58:44 -07:00
Network plumb trackingName through to native requests 2016-07-22 11:28:56 -07:00
PushNotificationIOS Fix misleading docstring on getInitialNotification 2016-08-03 12:28:41 -07:00
QuickPerformanceLogger AdsManager now uses new react native QPL identifiers 2016-07-20 07:28:36 -07:00
RCTTest Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
RKBackendNode Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
ReactIOS Don't collect warnings if yellow box is disabled 2016-07-29 09:28:28 -07:00
ReactNative Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Sample Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Settings Automated changes to remove implicit capture of self in blocks: Libraries/FBReactKit/BUCK 2016-07-07 12:44:14 -07:00
Share Add Share module 2016-07-25 03:43:29 -07:00
Storage update AsyncStorage.js documentation 2016-07-15 09:13:51 -07:00
StyleSheet Accept transforms list instead of matrix for transform view parameter. 2016-08-05 10:58:42 -07:00
Text Improve types in RCTFont API 2016-08-05 12:44:21 -07:00
Utilities Customize main thread initialization of native modules (2nd try) 2016-08-05 11:28:32 -07:00
Vibration Add support for vibration patterns 2016-03-29 21:45:20 -07:00
WebSocket Add MessageQueue method for executing function and returning its result 2016-07-18 07:13:32 -07:00
react-native Add Share module 2016-07-25 03:43:29 -07:00
vendor Fixed NativeEventListener deregistration 2016-05-16 04:13:56 -07:00
Promise.js Make onUnhandled safe for undefined errors 2016-08-02 07:58:28 -07:00
promiseRejectionIsError.js Add possibility to `console.error`/redbox on promise rejections 2016-03-15 05:22:22 -07:00