Commit Graph

24 Commits

Author SHA1 Message Date
Alex Kotliarskyi 2ef533352f Extract symbolicateStackTrace into its own module
Summary:
Having a function that symbolicates any given stack trace
is convenient, e.g. in #7459

More cleanup to follow.

Reviewed By: davidaurelio

Differential Revision: D3348616

fbshipit-source-id: 6313ec837869c6080829c811345a06aa1b2dcd21
2016-06-01 13:59:16 -07:00
Alex Kotliarskyi 7e100ac7a2 Extract getDevServerURL into reusable module
Summary:
Many RN devtools (inspector, source maps, etc.) rely on packager.
This refactors individual SourceCode.scriptURL parsing into one function
that will be easier to change in the future.

Reviewed By: javache

Differential Revision: D3348465

fbshipit-source-id: 5a55939ea59e1517cb63bcbe4963f57f02ab15f3
2016-06-01 13:59:16 -07:00
Alex Kotliarskyi 946ec48a07 Use RN Packager to symbolicate stack in redbox
Summary:
See "D3291793 Symbolicate JS stacktrace using RN Packager" for the background
of why this matters. TLDR - saving tons of memory by moving symbolication from
JSC into server and cleaning up old hacks.

Before this change: a redbox causes +73MB JSC size
{F60869250}
{F60869249}

After this change: a redbox causes +1MB JSC size
{F61005061}
{F61005062}

Next step – replace JS implementation by native to show better progress and
clean up even more old APIs (ExceptionsManager.updateExceptionMessage).

Reviewed By: davidaurelio

Differential Revision: D3319151

fbshipit-source-id: 48ff4df27642ea4e1bc2414f48a8dd4d32adee50
2016-05-20 12:13:49 -07:00
Martín Bigio f2438b440d Hot Loading Sourcemaps
Summary:
public

To make sourcemaps work on Hot Loading work, we'll need to be able to serve them for each module that is dynamically replaced. To do so we introduced a new parameter to the bundler, namely `entryModuleOnly` to decide whether or not to process the full dependency tree or just the module associated to the entry file. Also we need to add `//sourceMappingURL` to the HMR updates so that in case of an error the runtime retrieves the sourcemaps for the file on which an error occurred from the server.

Finally, we need to refactor a bit how we load the HMR updates into JSC. Unfortunately, if the code is eval'ed when an error is thrown, the line and column number are missing. This is a bug/missing feature in JSC. To walkaround the issue we need to eval the code on native. This adds a bit of complexity to HMR as for both platforms we'll have to have a thin module to inject code but I don't see any other alternative. when debugging this is not needed as Chrome supports sourceMappingURLs on eval'ed code

Reviewed By: javache

Differential Revision: D2841788

fb-gh-sync-id: ad9370d26894527a151cea722463e694c670227e
2016-01-27 14:55:36 -08:00
Milen Dzhumerov 1304e78136 Inline require ExceptionsManager dependencies
Summary:
Inline require `ExceptionsManager` dependencies which are eagerly loaded on app startup (via `setUpConsole()` which is called from `InitializeJavaScriptAppEngine.js`) even though it's necessary until an exception needs to be reported.

This can save about 30-40ms on an iOS device.

public

Reviewed By: nicklockwood, tadeuzagallo, jspahrsummers

Differential Revision: D2755161

fb-gh-sync-id: d4cbfebf04d861b3a70558346a395d3d3ee87cc6
2015-12-16 04:02:30 -08:00
Pieter De Baets 0c83407dd2 Simplify logging exceptions from JS to native
Reviewed By: vjeux

Differential Revision: D2615559

fb-gh-sync-id: ee931b3691251c8b6276699c6f927e47d8e8fd97
2015-11-05 12:51:47 -08:00
Bill Glover 8fb9cc8fc1 Fix 16 linter warnings in Examples/
Summary: Partially fixes #3316 by addressing 16 linter warnings:
 - Strings should be singlequote
 - Missing semicolon

Travis build jobs 1.1 through 1.4 complete successfully. 1.5 fails through what appears to be an unrelated issue on master.
Closes https://github.com/facebook/react-native/pull/3332

Reviewed By: @​svcscm

Differential Revision: D2531718

Pulled By: @javache

fb-gh-sync-id: ca22fbeac5fe3b4f725775a72f21b6dd7a75d94b
2015-10-16 04:03:23 -07:00
Alex Kotliarskyi 34d57afc32 Handle errors that are not `Error` instances
Reviewed By: @sahrens

Differential Revision: D1799587
2015-09-23 19:29:19 -07:00
James Ide 4fd03ba21a Finish up the work to send through the error cookie
Summary: - Includes the error cookie with soft exceptions as well since they too can be updated (requires tiny Android change too)
- Passes the error cookie through instead of leaving it unused
Closes https://github.com/facebook/react-native/pull/2198

Reviewed By: @​svcscm

Differential Revision: D2455391

Pulled By: @sahrens
2015-09-17 18:15:27 -07:00
Ben Alpert 65692b7235 [ReactNative] Don't redbox for React warnings when not using Chrome executor 2015-08-17 16:02:10 -07:00
Ben Alpert e01f90784f [ReactNative] Update core RN modules to work with React 0.14-beta1 2015-07-23 18:07:59 -08:00
Dorota Kapturkiewicz ba433be886 [ReactNative] Make ErrorCookie work. 2015-07-15 04:04:09 -08:00
Andrei Coman 9b455c8677 [react_native] JS files from D2115306: implement ExceptionsManager.report(Fatal|Soft)Exception 2015-06-02 07:41:40 -08:00
Nick Lockwood 7c3070628a Fixed infinite #clowntown error loop 2015-05-14 12:19:15 -08:00
Spencer Ahrens 81ad810186 [ReactNative] differentiate fatal and soft exceptions 2015-05-13 13:24:37 -07:00
Andrei Coman 8fe6626d5f [react_native] JS files from D2028144: [react_native] Expose android version to JS 2015-04-30 11:42:14 -08:00
Spencer Ahrens ecf7baebea [React Native] Actually bring back console.error redboxes with disable flag 2015-04-28 14:53:36 -08:00
Philipp von Weitershausen e88ba1a6a3 [ReactNative] Back out D2014163 entirely 2015-04-23 12:02:47 -08:00
Spencer Ahrens e63bfae8f6 [ReactNative] console.error shows RedBox with pretty stack trace 2015-04-22 15:51:41 -08:00
Spencer Ahrens 0727cde42c [ReactNative] Quick fix to busted redboxes 2015-04-22 10:29:36 -08:00
Alex Kotliarskyi 128be89491 [react_native] JS files from D1961099: Format stack trace on native side 2015-04-02 14:55:58 -08:00
Basil Hosmer 030b264eb4 flowify a few more Libraries 2015-03-26 10:13:38 -08:00
Christopher Chedeau e1ef0328d9 [ReactNative] Expanded license on js files 2015-03-23 13:17:54 -08:00
Alex Kotliarskyi d6a031b431 [ReactNative] Make JS stack traces in Xcode prettier 2015-03-19 09:25:46 -08:00