TM iOS: avoid bad memory access when passing prop name to a lambda
Summary: Depending on the timing of the method call from JS to a CxxModule, we may be accessing memory that has been deallocated, causing exception to RN runtime. This fixes it. Reviewed By: JoshuaGross, mdvacca Differential Revision: D14033831 fbshipit-source-id: 5a77aa41223b1fc3146dcf78b7f8e93375605d6d
This commit is contained in:
parent
2c09c06a4d
commit
344b32bb64
|
@ -62,7 +62,7 @@ jsi::Value TurboCxxModule::get(jsi::Runtime& runtime, const jsi::PropNameID& pro
|
|||
runtime,
|
||||
propName,
|
||||
0,
|
||||
[this, &propNameUtf8](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) {
|
||||
[this, propNameUtf8](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) {
|
||||
return invokeMethod(rt, VoidKind, propNameUtf8, args, count);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue