@Override
 protected void onCancelled(Result<ReactApplicationContext> reactApplicationContextResult) {
   try {
     mMemoryPressureRouter.destroy(reactApplicationContextResult.get());
   } catch (Exception e) {
     FLog.w(ReactConstants.TAG, "Caught exception after cancelling react context init", e);
   } finally {
     mReactContextInitAsyncTask = null;
   }
 }
    @Override
    protected void onPostExecute(Result<ReactApplicationContext> result) {
      try {
        setupReactContext(result.get());
      } catch (Exception e) {
        mDevSupportManager.handleException(e);
      } finally {
        mReactContextInitAsyncTask = null;
      }

      // Handle enqueued request to re-initialize react context.
      if (mPendingReactContextInitParams != null) {
        recreateReactContextInBackground(
            mPendingReactContextInitParams.getJsExecutorFactory(),
            mPendingReactContextInitParams.getJsBundleLoader());
        mPendingReactContextInitParams = null;
      }
    }