react-native/Libraries
Hilke Heremans be5e300abf Fix symbolication on stack trace with whatwg-fetch as a dependency
Summary:
This PR provides a workaround for issue #9605 which affects projects which directly or indirectly require `whatwg-fetch`. At that point, all symbolication on stack trace errors fails due to a circular require caused by RN's lazy loading of `fetch`, which results in `fetch` becoming `undefined`.

The workaround is simple: we postpone requiring `fetch` until the first `symbolicateStackTrace` call, at which point we can be certain `fetch` is properly exported. It is then cached for future use.

No tests have been added since, apparently, this module did not have any tests to begin with. Manual tests were performed on a regular project (not including `whatwg-fetch` externally) and a project that has direct and indirect includes for `whatwg-fetch`.
Closes https://github.com/facebook/react-native/pull/10247

Differential Revision: D4175835

Pulled By: hramos

fbshipit-source-id: d849a5874373e76f166ea6ab23f0f888792d1aef
2016-11-14 09:13:40 -08:00
..
ART RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
ActionSheetIOS ActionSheetIOS - Pass URL, not file contents to UIActivityViewController for file URLs. 2016-09-06 04:43:36 -07:00
AdSupport Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Alert fix typo in Alert.js 2016-10-14 08:13:55 -07:00
Animated Add extractOffset to Animated 2016-11-07 20:43:37 -08:00
AppState Remove deprecated APIs and modules 2016-10-11 07:43:52 -07:00
BatchedBridge Reorganize core JS files 2016-10-11 10:14:28 -07:00
BugReporting RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
CameraRoll Update file for Markdown link syntax 2016-10-16 15:28:42 -07:00
Components Expose NavigatorIOS::replaceAtIndex 2016-11-11 12:58:35 -08:00
Core Fix symbolication on stack trace with whatwg-fetch as a dependency 2016-11-14 09:13:40 -08:00
CustomComponents Android: Reduce overdraw layers by hiding cards when they are not visible 2016-11-14 08:59:24 -08:00
DebugComponentHierarchy
EventEmitter Cleanup: Remove `@typechecks` 2016-10-12 19:28:42 -07:00
Experimental fix FlowFixMe in SwipeableQuickActionButton 2016-10-24 09:58:53 -07:00
Geolocation RCTLocationObserver: Fix reporting of timeout error 2016-09-21 14:28:43 -07:00
Image Remove underline colour in Android text inputs 2016-11-04 14:58:46 -07: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 Remove deprecated APIs and modules 2016-10-11 07:43:52 -07:00
Modal update Modal.js to fix #10662 2016-11-04 18:43:42 -07:00
NativeAnimation Add extractOffset to Animated 2016-11-07 20:43:37 -08:00
NavigationExperimental Fixed the issue that _onTransitionEnd might try to setState at unmoun… 2016-11-11 09:43:48 -08:00
Network Update fbsource 2016-11-08 12:43:48 -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 added semicolon which broke in #8040 2016-10-27 03:13:43 -07:00
RCTTest Travis CI reliability fixes: preload package manager and increase tim… 2016-10-16 15:43:44 -07:00
ReactNative Update fbsource 2016-11-08 12:43:48 -08:00
Renderer Update fbsource 2016-11-08 12:43:48 -08:00
Sample Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
Settings Apple TV support 2: Xcode projects and CI (scripts/objc-test.sh) 2016-10-05 07:28:44 -07: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 Remove FlowFixMe from TextStylePropTypes 2016-11-10 08:58:41 -08:00
Utilities FIX: Call all android back key handlers before invoking default 2016-11-11 00:28:40 -08:00
Vibration Update React Native minimum OS version to iOS8 2016-09-01 19:43:47 -07:00
WebSocket ios:websocket:exectuor : Grab port from Bundle URL 2016-10-12 08:43:37 -07:00
react-native RN: Update React (2/2) 2016-11-04 05:43:44 -07:00
vendor Cleanup clear/set/throwImmediate 2016-08-12 07:28:38 -07:00
Promise.js Make onUnhandled safe for undefined errors 2016-08-02 07:58:28 -07:00
promiseRejectionIsError.js