Skip to content

Commit

Permalink
Fix type in BlobCollector.h/cpp (facebook#41404)
Browse files Browse the repository at this point in the history
Summary:
When working on JSI module, `BlobCollector`'s `nativeInstall` is a good example. But the first type should be `jni::alias_ref<jclass>` 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: facebook#41404

Test Plan: None

Reviewed By: cipolleschi

Differential Revision: D51198049

Pulled By: javache

fbshipit-source-id: 86f471cbe3cd683a7be605ce127b3b3c3769c037
  • Loading branch information
Sunbreak authored and Othinn committed Jan 9, 2024
1 parent 406c184 commit fda9781
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ BlobCollector::~BlobCollector() {
}

void BlobCollector::nativeInstall(
jni::alias_ref<jhybridobject> jThis,
jni::alias_ref<jclass>,
jni::alias_ref<jobject> blobModule,
jlong jsContextNativePointer) {
auto& runtime = *((jsi::Runtime*)jsContextNativePointer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ namespace facebook::react {
class BlobCollector : public jni::HybridClass<BlobCollector>,
public jsi::HostObject {
public:
BlobCollector(
jni::global_ref<jobject> blobManager,
const std::string& blobId);
BlobCollector(jni::global_ref<jobject> blobModule, const std::string& blobId);
~BlobCollector();

static constexpr auto kJavaDescriptor =
"Lcom/facebook/react/modules/blob/BlobCollector;";

static void nativeInstall(
jni::alias_ref<jhybridobject> jThis,
jni::alias_ref<jclass>,
jni::alias_ref<jobject> blobModule,
jlong jsContextNativePointer);

Expand Down

0 comments on commit fda9781

Please sign in to comment.