Skip to content

Commit

Permalink
Throw ReactNoCrashSoftException when handle memeory pressure to avoid…
Browse files Browse the repository at this point in the history
… crash

Summary:
As title

Changelog:
[Android][Changed] - Throw ReactNoCrashSoftException when handle memeory pressure to avoid crash

Reviewed By: jacdebug

Differential Revision: D47596577

fbshipit-source-id: 311492eaa4ed15b17807f5aa6c351a528fcfcdfa
  • Loading branch information
Lulu Wu authored and facebook-github-bot committed Jul 19, 2023
1 parent f7f5b49 commit fa9ea83
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.facebook.react.bridge.NativeArray;
import com.facebook.react.bridge.NativeMap;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactNoCrashSoftException;
import com.facebook.react.bridge.ReactSoftExceptionLogger;
import com.facebook.react.bridge.RuntimeExecutor;
import com.facebook.react.bridge.RuntimeScheduler;
Expand Down Expand Up @@ -467,7 +468,7 @@ public void handleMemoryPressure(int level) {
} catch (NullPointerException e) {
ReactSoftExceptionLogger.logSoftException(
TAG,
new IllegalViewOperationException(
new ReactNoCrashSoftException(
"Native method handleMemoryPressureJs is called earlier than librninstance.so got ready."));
}
}
Expand Down

0 comments on commit fa9ea83

Please sign in to comment.