-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't create DevSupportManager when not in Dev mode
Summary: public 1. fixes I/O on UI Thread diffusion/FA/browse/master/java/com/facebook/catalyst/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManager.java;e6819b923967f9380dd6c10bfa8f1f40be558e2f$149 in prod builds 2. Less calls to Choreographer (i.e. https://fburl.com/188102408 in AutoProfiler) ==> better newsfeed scroll perf 3. Lower Memory footprint in prod Reviewed By: astreet Differential Revision: D2759498 fb-gh-sync-id: 4f593ba9219febb7045f4e470a14995e995ebbb1
- Loading branch information
1 parent
47d0e3c
commit 6483645
Showing
5 changed files
with
899 additions
and
696 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
27 changes: 27 additions & 0 deletions
27
...roid/src/main/java/com/facebook/react/bridge/DefaultNativeModuleCallExceptionHandler.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright (c) 2015-present, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
|
||
package com.facebook.react.bridge; | ||
|
||
/** | ||
* Crashy crashy exception handler. | ||
*/ | ||
public class DefaultNativeModuleCallExceptionHandler implements NativeModuleCallExceptionHandler { | ||
|
||
@Override | ||
public void handleException(Exception e) { | ||
if (e instanceof RuntimeException) { | ||
// Because we are rethrowing the original exception, the original stacktrace will be | ||
// preserved. | ||
throw (RuntimeException) e; | ||
} else { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
} |
Oops, something went wrong.