Skip to content

Commit

Permalink
Ensure callbacks can only be called once on the native side
Browse files Browse the repository at this point in the history
Summary: This is just a minor fix to D17380360. Basically, we want to make sure that callbacks can only be called once on the ObjC side.

Reviewed By: fkgozali

Differential Revision: D17403852

fbshipit-source-id: b0d2bbd539daef4837a345bc2953dd9687b3147b
  • Loading branch information
RSNara authored and facebook-github-bot committed Sep 17, 2019
1 parent 543420c commit 1534386
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ static RCTResponseSenderBlock convertJSIFunctionToCallback(
strongWrapper2->callback().call(strongWrapper2->runtime(), (const jsi::Value *)args.data(), args.size());
strongWrapper2->destroy();
});

wrapperWasCalled = YES;
};
}

Expand Down

0 comments on commit 1534386

Please sign in to comment.