Summary:
need to remove function declaration in a lexically nested statement
because babel uses 'use strict' by default now
Closes https://github.com/facebook/react-native/pull/11390
Differential Revision: D4308275
fbshipit-source-id: 0d073361d25b23fb67f001225feb72532af38683
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
Summary: Adds methods in XMLHttpRequest so that the agent can hook the events needed for the implementation, these are only enabled if the agent is enabled (which means that the inspector is connected), it is also stripped out in non-dev currently.
Reviewed By: davidaurelio
Differential Revision: D4021516
fbshipit-source-id: c0c00d588404012d20b744de74e5ecbe5c002a53