mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
b4d5ffb804
Summary: A UBN surfaced in v252 because [this assert](https://our.intern.facebook.com/intern/diffusion/FBS/browse/master/xplat/js/react-native-github/React/Modules/RCTEventEmitter.m?commit=e5d1e6375a640d0387bb7016d3becd262c22c327&lines=40) started firing, originating from `RCTAppState`. This appears to be a race condition during RN teardown. RN receives a memory warning and attempts to forward to JS, but the bridge is already destroyed. IMO, if the bridge is already destroyed, then there shouldn't be a need to send a memory warning to JS? This is just a hunch though, if anyone feels otherwise, please let me know :) See the UBN task for further details. Changelog: [iOS][Internal] Guard against nil bridge during teardown Reviewed By: shergin Differential Revision: D19293063 fbshipit-source-id: 566f21af30d3d9bcd25a673ce664f8caddc701ca
13 lines
289 B
Objective-C
13 lines
289 B
Objective-C
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <React/RCTEventEmitter.h>
|
|
|
|
@interface RCTAppState : RCTEventEmitter <RCTInvalidating>
|
|
|
|
@end
|