Commit Graph

3 Commits

Author SHA1 Message Date
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
James Ide 0fe1c7a9ff Fix symbolication failure caused by attempt to modify frozen frame
Summary:
This change makes so that processing stack trace before sending it to packager (see 7dbc805)
doesn't modify original frames but creates a copies instead.

This is required because after some changes that also have been landed in 0.35, frames that arrive to
'symbolicateStackTrace' are already frozen, so changing 'file' property of the original frame causes
symbolication to fail.
Closes https://github.com/facebook/react-native/pull/10655

Differential Revision: D4110273

fbshipit-source-id: 0302694b520d83a79c3cb67903038b3f494315f2
2016-11-01 02:58:41 -07:00
Pieter De Baets 292cc82d0e Reorganize core JS files
Reviewed By: lexs

Differential Revision: D3987463

fbshipit-source-id: fa8f1d1bea7ed699120b9705ddc1c83767fcf8e4
2016-10-11 10:14:28 -07:00