Fix NPE in ReactInstaceManager.setupReactContext

Reviewed By: AaaChiuuu, mhorowitz

Differential Revision: D5724464

fbshipit-source-id: 80d0b97f4294f6894e0d034dda6dd1a3db4b1341
This commit is contained in:
Michał Gregorczyk 2017-09-01 09:01:17 -07:00 committed by Facebook Github Bot
parent c65d904264
commit 4cba3abf06

View File

@ -903,20 +903,23 @@ public class ReactInstanceManager {
});
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
ReactMarker.logMarker(SETUP_REACT_CONTEXT_END);
mCurrentReactContext.runOnJSQueueThread(new Runnable() {
reactContext.runOnJSQueueThread(
new Runnable() {
@Override
public void run() {
Process.setThreadPriority(Process.THREAD_PRIORITY_DEFAULT);
}
});
mCurrentReactContext.runOnNativeModulesQueueThread(new Runnable() {
reactContext.runOnNativeModulesQueueThread(
new Runnable() {
@Override
public void run() {
Process.setThreadPriority(Process.THREAD_PRIORITY_DEFAULT);
}
});
if (mUseSeparateUIBackgroundThread) {
mCurrentReactContext.runOnUiBackgroundQueueThread(new Runnable() {
reactContext.runOnUiBackgroundQueueThread(
new Runnable() {
@Override
public void run() {
Process.setThreadPriority(Process.THREAD_PRIORITY_DEFAULT);