Handle invalidation error in RCTObjcExecutor

Differential Revision: D6748200

fbshipit-source-id: eb98782c2ba080273c1f027846984f5f4caddf26
This commit is contained in:
Alex Dvornikov 2018-01-18 15:21:01 -08:00 committed by Facebook Github Bot
parent 65184ec6b0
commit 493f3e8da5
1 changed files with 4 additions and 1 deletions

View File

@ -45,7 +45,10 @@ public:
{ {
m_jsCallback = ^(id json, NSError *error) { m_jsCallback = ^(id json, NSError *error) {
if (error) { if (error) {
m_errorBlock(error); // Do not use "m_errorBlock" here as the bridge might be in the middle
// of invalidation as a result of error handling and "this" can be
// already deallocated.
errorBlock(error);
return; return;
} }