Skip to content

Commit f21c79a

Browse files
authored
perf: Make JS callbacks lock-free (#446)
1 parent 2ebff1b commit f21c79a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

packages/react-native-nitro-modules/cpp/jsi/JSIConverter+Function.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ struct JSIConverter<std::function<ReturnType(Args...)>> final {
9595

9696
private:
9797
static inline ResultingType callJSFunction(jsi::Runtime& runtime, const OwningReference<jsi::Function>& function, const Args&... args) {
98-
// Throw a lock on the OwningReference<T> so we can guarantee safe access (Hermes GC cannot delete it while `lock` is alive)
99-
OwningLock<jsi::Function> lock = function.lock();
100-
10198
if (!function) {
10299
if constexpr (std::is_void_v<ResultingType>) {
103100
// runtime has already been deleted. since this returns void, we can just ignore it being deleted.

0 commit comments

Comments
 (0)