react-native/Libraries
Daniel Dimitrov ad36c1af71 Cannot assign to read only property 'product' of object '#<WorkerNavi…
Summary:
When running in strict mode we run into the following error:
“Cannot assign to read only property 'product' of object '#<WorkerNavigator>’”

Moreover navigator.product = ‘ReactNative’; didn’t actually change the product value. Without strict mode this was silently ignored.

By using our defineProperty function we are able to run in strict mode and now navigator.product is really ReactNative.

See https://github.com/facebook/react-native/issues/10881 for more information

---------------

Long story short - if we run in strict mode, the current code throws an error :
`Cannot assign to read only property 'product' of object '#<WorkerNavigator>' initializeCore.js`
(the current version of initializeCore.js doesn't have 'use strict'; on top, but if you are unfortunate enough to have a babel module that ads this for you, you are guaranteed to run into this. Moreover our contributing guidelines say that we should have 'use strict'; https://github.com/facebook/react-native/blob/master/CONTRIB
Closes https://github.com/facebook/react-native/pull/11057

Differential Revision: D4219958

Pulled By: javache

fbshipit-source-id: 35568b2ce4b87fff1aa8248f067d49e5f9f9e9a2
2016-11-22 07:28:34 -08:00
..
ART RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
ActionSheetIOS Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
AdSupport Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
Alert fix typo in Alert.js 2016-10-14 08:13:55 -07:00
Animated RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
AppState Remove deprecated APIs and modules 2016-10-11 07:43:52 -07:00
BatchedBridge Deploy v0.35.0 2016-11-14 20:45:17 -08:00
BugReporting RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
CameraRoll Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
Components RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
Core Cannot assign to read only property 'product' of object '#<WorkerNavi… 2016-11-22 07:28:34 -08:00
CustomComponents Navigator: null check on gesture.overswipe to prevent crash 2016-11-20 15:28:31 -08:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
EventEmitter RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
Experimental enable variable size slideoutView with swipeableListView 2016-11-14 11:58:58 -08:00
Geolocation Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
Image Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
Inspector RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
Interaction RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
JSInspector Add Network agent 2016-11-02 12:29:15 -07:00
LayoutAnimation RN: Stop Deep Linking `ReactPropTypes` 2016-10-14 18:59:10 -07:00
Linking Auto-fix lint errors 2016-08-09 06:43:46 -07:00
LinkingIOS Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
Modal make Modal pass rootTag to AppContainer 2016-11-18 01:43:26 -08:00
NativeAnimation Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
NavigationExperimental Fixed the issue that _onTransitionEnd might try to setState at unmoun… 2016-11-11 09:43:48 -08:00
Network Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
Performance RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
PermissionsAndroid Docs fix: remove confusing typo 2016-09-19 14:46:12 -07:00
PushNotificationIOS Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
RCTTest Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
ReactNative make Modal pass rootTag to AppContainer 2016-11-18 01:43:26 -08:00
Renderer Unbreak custom animated components 2016-11-14 20:58:56 -08:00
Sample Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Settings Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
Share Add Share module 2016-07-25 03:43:29 -07:00
Storage Auto-fix lint errors 2016-08-09 06:43:46 -07:00
StyleSheet RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
Text Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
Utilities RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
Vibration Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
WebSocket Fix CSSLayout import hack, update podspec 2016-11-21 09:13:36 -08:00
react-native RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
vendor RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
Promise.js Make onUnhandled safe for undefined errors 2016-08-02 07:58:28 -07:00
promiseRejectionIsError.js RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00