Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused mapException methods #38042

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ file(GLOB reactnativejni_SRC CONFIGURE_DEPENDS *.cpp)

add_compile_options(
-fexceptions
-frtti
-Wno-unused-lambda-capture
-std=c++17
-DWITH_INSPECTOR=1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ using namespace facebook::jni;

namespace facebook::react {

// TODO T112842309: Remove after fbjni upgraded in OSS
void ReadableNativeArray::mapException(const std::exception &ex) {
if (dynamic_cast<const folly::TypeError *>(&ex) != nullptr) {
throwNewJavaException(
exceptions::gUnexpectedNativeTypeExceptionClass, ex.what());
}
}

void ReadableNativeArray::mapException(std::exception_ptr ex) {
try {
std::rethrow_exception(ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class ReadableNativeArray
static constexpr const char *kJavaDescriptor =
"Lcom/facebook/react/bridge/ReadableNativeArray;";

static void mapException(const std::exception &ex);
static void mapException(std::exception_ptr ex);
static void registerNatives();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ using namespace facebook::jni;

namespace facebook::react {

// TODO T112842309: Remove after fbjni upgraded in OSS
void ReadableNativeMap::mapException(const std::exception &ex) {
if (dynamic_cast<const folly::TypeError *>(&ex) != nullptr) {
throwNewJavaException(
exceptions::gUnexpectedNativeTypeExceptionClass, ex.what());
}
}

void ReadableNativeMap::mapException(std::exception_ptr ex) {
try {
std::rethrow_exception(ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ struct ReadableNativeMap : jni::HybridClass<ReadableNativeMap, NativeMap> {
std::optional<folly::dynamic> keys_;
static jni::local_ref<jhybridobject> createWithContents(folly::dynamic &&map);

static void mapException(const std::exception &ex);
static void mapException(std::exception_ptr ex);
static void registerNatives();

Expand Down