Page MenuHomePhabricator

D9197.id31128.diff
No OneTemporary

D9197.id31128.diff

diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
--- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
+++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
@@ -930,13 +930,13 @@
jsi::Value CommCoreModule::generateRandomString(jsi::Runtime &rt, double size) {
return createPromiseAsJSIValue(
- rt,
- [this, &size](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) {
- taskType job = [this, &innerRt, &size, promise]() {
+ rt, [=](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) {
+ taskType job = [=, &innerRt]() {
std::string error;
std::string randomString;
try {
- randomString = crypto::Tools::generateRandomString(size);
+ randomString =
+ crypto::Tools::generateRandomString(static_cast<size_t>(size));
} catch (const std::exception &e) {
error = "Failed to generate random string for size " +
std::to_string(size) + ": " + e.what();

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 6:54 AM (20 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2698008
Default Alt Text
D9197.id31128.diff (1 KB)

Event Timeline