Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Guard against nil methodQueue in RCTBlobManager
Summary: ## Description In T63516227, we're seeing a crash that occurs because `networking.methodQueue` is `nil`, and we try to `dispatch_async` to it. ## Hypothesis This looks like a problem with NativeModule cleanup: 1. Some JS executes a call to `RCTBlobManager.addNetworkingHander`. This schedules an async method call on the `RCTBlobManager` method queue. 2. In `RCTCxxBridge invalidate`, on the JS thread, we loop through all the `RCTModuleData`s, and invalidate them. This invalidates our NativeModules (perhaps not all but only `RCTNetworking`). 3. The `RCTBlobManager.addNetworkingHander` method call finally executes, with `RCTNetworking`'s methodQueue set to nil, which throws this error. Changelog: [iOS][Fixed] - Fix RCTBlobManager cleanup crash Reviewed By: PeteTheHeat Differential Revision: D20498096 fbshipit-source-id: d2d60984637ddf883278289258aa9b2ae81bb172
- Loading branch information