forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Symbolicate JS stacktrace using RN Packager
Summary: The way we currently symbolicate JS stack traces in RN during development time (e.g. inside the RedBox) is the following: we download the source map from RN, parse it and use `source-map` find original file/line numbers. All happens inside running JSC VM in a simulator. The problem with this approach is that the source map size is pretty big and it is very expensive to load/parse. Before we load sourcemaps: {F60869250} After we load sourcemaps: {F60869249} In the past it wasn't a big problem, however the sourcemap file is only getting larger and soon we will be loading it for yellow boxes too: facebook#7459 Moving stack trace symbolication to server side will let us: - save a bunch of memory on device - improve performance (no need to JSON serialize/deserialize and transfer sourcemap via HTTP and bridge) - remove ugly workaround with `RCTExceptionsManager.updateExceptionMessage` - we will be able to symbolicate from native by simply sending HTTP request, which means symbolication can be more robust (no need to depend on crashed JS to do symbolication) and we can pause JSC to avoid getting too many redboxes that hide original error. - reduce the bundle by ~65KB (the size of source-map parsing library we ship, see SourceMap module) Reviewed By: davidaurelio Differential Revision: D3291793 fbshipit-source-id: 29dce5f40100259264f57254e6715ace8ea70174
- Loading branch information
Showing
2 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters