mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Improve RCTCxxBridge invalidation
Reviewed By: fromcelticpark Differential Revision: D5536063 fbshipit-source-id: b0f19bebea839c7da84890c338ad4d38293bc99c
This commit is contained in:
committed by
Facebook Github Bot
parent
023ac57337
commit
7b770556ac
@@ -928,6 +928,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
|
||||
{
|
||||
RCTAssertJSThread();
|
||||
|
||||
if (!self.valid) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (buffer != nil && buffer != (id)kCFNull) {
|
||||
_wasBatchActive = YES;
|
||||
[self handleBuffer:buffer];
|
||||
|
||||
@@ -373,6 +373,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init);
|
||||
- (dispatch_queue_t)methodQueue
|
||||
{
|
||||
(void)[self instance];
|
||||
RCTAssert(_methodQueue != nullptr, @"Module %@ has no methodQueue (instance: %@, bridge.valid: %d)",
|
||||
self, _instance, _bridge.valid);
|
||||
return _methodQueue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user