Skip to content

Commit 493f3e8

Browse files
fromcelticparkfacebook-github-bot
authored andcommitted
Handle invalidation error in RCTObjcExecutor
Differential Revision: D6748200 fbshipit-source-id: eb98782c2ba080273c1f027846984f5f4caddf26
1 parent 65184ec commit 493f3e8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

React/CxxBridge/RCTObjcExecutor.mm

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@
4545
{
4646
m_jsCallback = ^(id json, NSError *error) {
4747
if (error) {
48-
m_errorBlock(error);
48+
// Do not use "m_errorBlock" here as the bridge might be in the middle
49+
// of invalidation as a result of error handling and "this" can be
50+
// already deallocated.
51+
errorBlock(error);
4952
return;
5053
}
5154

0 commit comments

Comments
 (0)