Files
react-native/React/Base
Samuel Susla e6debfe1dd Fix crash during reload on Marketplace Home
Summary:
# What's the problem?

`RCTSurfacePresenter._scheduler` is deallocated in `RCTSurfacePresenter.handleBridgeWillReloadNotification`.

It shouldn't be used before `RCTSurfacePresenter.handleJavaScriptDidLoadNotification` is called because that's when new `RCTSurfacePresenter._batchedBridge` is created, scheduler depends on this new `RCTSurfacePresenter._batchedBridge`.

But it is, it means that it is created with the old bridge, this means that it gets deallocated right away.

First access point of old bridge is in `RCTSurfacePresenter.setMinimumSize`.

# What's the fix?

Make sure surface has correct stage before calling layout methods.

The other idea was  to return early in `RCTSurfacePresenter.setMinimumSize` in case bridge isn't setup.

# Problems?
1. Following error still appears after reload
{F176556210}

2. There is a white space for a while. By white space a mean the screen stays white for a short period of time before displaying content.

Reviewed By: fkgozali, JoshuaGross

Differential Revision: D16762443

fbshipit-source-id: 5a2a880b0f5345f268291c86811264f42f6058b3
2019-08-12 10:52:44 -07:00
..
2019-03-12 19:41:51 -07:00
2019-03-12 19:41:51 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2018-09-17 12:33:01 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-07-23 03:23:11 -07:00
2019-07-12 16:51:28 -07:00