Skip to content

Commit

Permalink
Remove capture of instance_
Browse files Browse the repository at this point in the history
Summary:
The captured `instance_` will result in a call to JVM code to release the reference when the lambda is destroyed. However, Hermes may destroy the lambda in a non-JVM background thread.

Since `instance_` is a member of the class, and `this` is already captured, there is no need to capture it.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D24141179

fbshipit-source-id: e3b268485ed229ee933281a80e5dbe2feba55719
  • Loading branch information
neildhar authored and facebook-github-bot committed Oct 7, 2020
1 parent 8817499 commit dffb61d
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,6 @@ jsi::Value JavaTurboModule::invokeJavaMethod(
&jargs,
&globalRefs,
argCount,
instance_ = instance_,
methodID,
moduleNameStr = name_,
methodNameStr,
Expand Down

0 comments on commit dffb61d

Please sign in to comment.