Skip to content

Commit

Permalink
Remove CxxModuleWrapper.makeDSO (facebook#41309)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#41309

Changelog: [Internal][Removed] CxxModuleWrapper.makeDSO is not actively used and has been replaced by TurboModule infra.

Reviewed By: NickGerleman

Differential Revision: D50878589

fbshipit-source-id: 9fd11c1ee860ea65f1e985a132de3216ed042752
  • Loading branch information
javache authored and facebook-github-bot committed Nov 3, 2023
1 parent 87c2453 commit 9b61385
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,11 @@

import com.facebook.jni.HybridData;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.soloader.SoLoader;

/** This does nothing interesting, except avoid breaking existing code. */
@DoNotStrip
public class CxxModuleWrapper extends CxxModuleWrapperBase {
protected CxxModuleWrapper(HybridData hd) {
super(hd);
}

private static native CxxModuleWrapper makeDsoNative(String soPath, String factory);

public static CxxModuleWrapper makeDso(String library, String factory) {
SoLoader.loadLibrary(library);
String soPath = SoLoader.unpackLibraryAndDependencies(library).getAbsolutePath();
return makeDsoNative(soPath, factory);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ class CxxModuleWrapper
constexpr static const char* const kJavaDescriptor =
"Lcom/facebook/react/bridge/CxxModuleWrapper;";

static void registerNatives() {
registerHybrid(
{makeNativeMethod("makeDsoNative", CxxModuleWrapper::makeDsoNative)});
}

static jni::local_ref<CxxModuleWrapper::javaobject> makeDsoNative(
jni::alias_ref<jclass>,
const std::string& soPath,
const std::string& fname);

std::string getName() override {
return module_->getName();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <fbjni/fbjni.h>

#include "CatalystInstanceImpl.h"
#include "CxxModuleWrapper.h"
#include "CxxModuleWrapperBase.h"
#include "JCallback.h"
#include "JReactMarker.h"
#include "JavaScriptExecutorHolder.h"
Expand Down Expand Up @@ -78,7 +78,6 @@ extern "C" JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
ProxyJavaScriptExecutorHolder::registerNatives();
CatalystInstanceImpl::registerNatives();
CxxModuleWrapperBase::registerNatives();
CxxModuleWrapper::registerNatives();
JCxxCallbackImpl::registerNatives();
NativeArray::registerNatives();
ReadableNativeArray::registerNatives();
Expand Down

0 comments on commit 9b61385

Please sign in to comment.