Skip to content

Commit

Permalink
fix crash on install jsi module, unsafely accessing the JS thread fro…
Browse files Browse the repository at this point in the history
…m the main thread
  • Loading branch information
iwater committed May 26, 2023
1 parent 3ce33a8 commit dccae37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/QuickMd5.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ - (void)setBridge:(RCTBridge *)bridge
return;
}

installMd5(*(facebook::jsi::Runtime *)cxxBridge.runtime);
[bridge dispatchBlock:^{
installMd5(*(facebook::jsi::Runtime *)cxxBridge.runtime);
} queue:RCTJSThread];
}

- (void)invalidate {
Expand Down

0 comments on commit dccae37

Please sign in to comment.