mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove exceptions from MapBuffer class
Summary: In Fabric we don't throw exception. This diff removes exception from MapBuffer class changelog: [internal] internal Reviewed By: JoshuaGross, sammy-SC Differential Revision: D27303496 fbshipit-source-id: 3f8c3bd2b41121672ef05153459b20cdc2efcda3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7704f651a0
commit
0b5fbf367d
@@ -2,11 +2,16 @@ load(
|
||||
"//tools/build_defs/oss:rn_defs.bzl",
|
||||
"ANDROID",
|
||||
"fb_xplat_cxx_test",
|
||||
"get_apple_compiler_flags",
|
||||
"get_apple_inspector_flags",
|
||||
"get_preprocessor_flags_for_build_mode",
|
||||
"react_native_xplat_target",
|
||||
"rn_xplat_cxx_library",
|
||||
"subdir_glob",
|
||||
)
|
||||
|
||||
APPLE_COMPILER_FLAGS = get_apple_compiler_flags()
|
||||
|
||||
rn_xplat_cxx_library(
|
||||
name = "mapbuffer",
|
||||
srcs = glob(
|
||||
@@ -30,12 +35,15 @@ rn_xplat_cxx_library(
|
||||
"-std=c++14",
|
||||
"-Wall",
|
||||
],
|
||||
fbobjc_compiler_flags = APPLE_COMPILER_FLAGS,
|
||||
fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
|
||||
force_static = True,
|
||||
labels = ["supermodule:xplat/default/public.react_native.infra"],
|
||||
macosx_tests_override = [],
|
||||
platforms = (ANDROID),
|
||||
preprocessor_flags = [
|
||||
"-DLOG_TAG=\"ReactNative\"",
|
||||
"-DWITH_FBSYSTRACE=1",
|
||||
],
|
||||
tests = [":tests"],
|
||||
visibility = ["PUBLIC"],
|
||||
|
||||
@@ -32,7 +32,7 @@ MapBuffer::MapBuffer(uint8_t *const data, uint16_t dataSize) {
|
||||
if (dataSize != dataSize_) {
|
||||
LOG(ERROR) << "Error: Data size does not match, expected " << dataSize
|
||||
<< " found: " << dataSize_;
|
||||
throw "Error: Data size does not match";
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <react/renderer/mapbuffer/primitives.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <limits>
|
||||
|
||||
namespace facebook {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <react/renderer/mapbuffer/MapBuffer.h>
|
||||
#include <react/renderer/mapbuffer/primitives.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
Reference in New Issue
Block a user