react-native/Libraries/Core
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
..
Devtools Fix symbolication on stack trace with whatwg-fetch as a dependency 2016-11-14 09:13:40 -08:00
Timers Reorganize core JS files 2016-10-11 10:14:28 -07:00
__mocks__ Reorganize core JS files 2016-10-11 10:14:28 -07:00
ErrorUtils.js RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
ExceptionsManager.js Reorganize core JS files 2016-10-11 10:14:28 -07:00
InitializeCore.js Cannot assign to read only property 'product' of object '#<WorkerNavi… 2016-11-22 07:28:34 -08:00