Files
react-native/Libraries
Moti Zilberman 56f08fcf84 Pop bridge frames from errors thrown by sync host function calls
Summary:
When a synchronous call from JS to native code throws an error, it doesn't include a useful stack trace from the native side. To improve error attribution, this diff pops the frames in `MessageQueue.js` and `NativeModules.js` from the stack traces of such errors. This uses the `error.framesToPop` convention understood by RN's global error handler.

For now we limit this to errors converted from C++ exceptions in host functions, since those are not likely to ever contain further JavaScript frames at the point where we catch them; if they did, it would violate our assumption that the top two frames of the stack are in the JS bridge code.

Reviewed By: cwdick

Differential Revision: D15805054

fbshipit-source-id: 8c1dd7c81b00b6a88e31473271889af1f88f7263
2019-06-19 09:15:14 -07:00
..
2019-05-20 18:05:55 -07:00
2019-06-17 10:59:05 -07:00
2019-06-03 23:03:41 -07:00
2019-05-31 19:56:37 -07:00
2019-06-06 11:34:11 -07:00
2019-06-19 07:54:28 -07:00
2019-05-13 11:43:49 -07:00
2019-06-18 23:10:50 -07:00
2019-06-07 06:39:28 -07:00
2019-06-12 06:19:32 -07:00