Skip to content

Commit

Permalink
Remove unused mapException methods (#38042)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #38042

Follow-up cleanup from D34379950, now that fbjni has been upgraded. Also synced the internal and external build flags.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D46975010

fbshipit-source-id: 7d2fd215b68bcebbf259e23923fb3fec1ca09f8a
  • Loading branch information
javache authored and facebook-github-bot committed Jun 26, 2023
1 parent e6502d8 commit 772c9eb
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 19 deletions.
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

0 comments on commit 772c9eb

Please sign in to comment.