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: 55793616c3bd021f0cce733d1a5bd398acf1ec95
  • Loading branch information
javache authored and facebook-github-bot committed Jun 26, 2023
1 parent 26ef0d5 commit aabacea
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ set(CMAKE_VERBOSE_MAKEFILE on)
file(GLOB reactnativejni_SRC CONFIGURE_DEPENDS *.cpp)

add_compile_options(
-fexceptions
-frtti
-fexceptions
-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 aabacea

Please sign in to comment.