From c267a0679d21908e6e8026ca5ee542a9b571fb8b Mon Sep 17 00:00:00 2001 From: Sunbreak Date: Fri, 10 Nov 2023 05:26:58 -0800 Subject: [PATCH] Fix type in BlobCollector.h/cpp (#41404) Summary: When working on JSI module, `BlobCollector`'s `nativeInstall` is a good example. But the first type should be `jni::alias_ref` according to https://github.com/facebookincubator/fbjni/blob/main/docs/quickref.md#basic-method-usage-java-to-c-and-c-to-java Fix type in BlobCollector.h/cpp ## Changelog: [ANDROID] [FIXED] - Fix type in BlobCollector.h/cpp Pull Request resolved: https://github.com/facebook/react-native/pull/41404 Test Plan: None Reviewed By: cipolleschi Differential Revision: D51198049 Pulled By: javache fbshipit-source-id: 86f471cbe3cd683a7be605ce127b3b3c3769c037 --- .../src/main/jni/react/reactnativeblob/BlobCollector.cpp | 2 +- .../src/main/jni/react/reactnativeblob/BlobCollector.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.cpp index 6dfebe4e9ae75c..d16ba17aa4c553 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.cpp @@ -33,7 +33,7 @@ BlobCollector::~BlobCollector() { } void BlobCollector::nativeInstall( - jni::alias_ref jThis, + jni::alias_ref, jni::alias_ref blobModule, jlong jsContextNativePointer) { auto& runtime = *((jsi::Runtime*)jsContextNativePointer); diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.h b/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.h index 1a0a705d2c721c..f72e9be5ffb65b 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.h @@ -15,16 +15,14 @@ namespace facebook::react { class BlobCollector : public jni::HybridClass, public jsi::HostObject { public: - BlobCollector( - jni::global_ref blobManager, - const std::string& blobId); + BlobCollector(jni::global_ref blobModule, const std::string& blobId); ~BlobCollector(); static constexpr auto kJavaDescriptor = "Lcom/facebook/react/modules/blob/BlobCollector;"; static void nativeInstall( - jni::alias_ref jThis, + jni::alias_ref, jni::alias_ref blobModule, jlong jsContextNativePointer);