From db804d807f0a806b423e8802096f6292970a70c9 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Thu, 25 Jun 2026 03:12:53 -0700 Subject: [PATCH] Move ErrorUtils from cxxreact to jserrorhandler (#57236) Summary: Pull Request resolved: https://github.com/react/react-native/pull/57236 Move `handleJSError` from `cxxreact/ErrorUtils.h` (header-inline) to `jserrorhandler/ErrorUtils.{h,cpp}` (declared + linked). Inverts the cyclic dep so `jserrorhandler` becomes a standalone leaf and `cxxreact:bridge` can be narrowed out of more consumers in follow-ups. The old `` include path continues to work via a deprecated `#warning` forwarder header that includes the new location. `cxxreact:bridge` now depends on `jserrorhandler:jserrorhandler` so existing consumers of the deprecated path still link cleanly. `jserrorhandler/BUCK` drops its `cxxreact:bridge` dep (and the matching `React-cxxreact` podspec entry). Changelog: [Internal] Reviewed By: christophpurrer Differential Revision: D108786498 --- packages/react-native/Package.swift | 31 ++++++------- .../ReactCommon/ReactCommon.podspec | 13 +----- .../ReactCommon/cxxreact/CMakeLists.txt | 1 + .../ReactCommon/cxxreact/ErrorUtils.h | 34 +------------- .../ReactCommon/cxxreact/Instance.cpp | 2 +- .../ReactCommon/cxxreact/NativeToJsBridge.cpp | 2 +- .../cxxreact/React-cxxreact.podspec | 1 + .../ReactCommon/jserrorhandler/ErrorUtils.cpp | 42 +++++++++++++++++ .../ReactCommon/jserrorhandler/ErrorUtils.h | 16 +++++++ .../jserrorhandler/JsErrorHandler.cpp | 2 +- .../React-jserrorhandler.podspec | 5 +- .../jsiexecutor/jsireact/JSIExecutor.cpp | 2 +- .../react/bridging/React-bridging.podspec | 45 ++++++++++++++++++ .../ios/React-NativeModulesApple.podspec | 2 +- .../renderer/runtimescheduler/CMakeLists.txt | 1 + .../React-runtimescheduler.podspec | 1 + .../runtimescheduler/RuntimeScheduler.cpp | 2 +- .../react/runtime/ReactInstance.cpp | 2 +- .../cocoapods/__tests__/codegen_utils-test.rb | 2 +- .../__tests__/new_architecture-test.rb | 4 +- .../scripts/cocoapods/new_architecture.rb | 2 +- .../generate-artifacts-executor-test.js.snap | 4 +- .../templates/ReactCodegen.podspec.template | 2 +- .../react-native/scripts/react_native_pods.rb | 1 + packages/rn-tester/Podfile.lock | 46 ++++++++++--------- .../api-snapshots/ReactAndroidDebugCxx.api | 1 + .../api-snapshots/ReactAndroidNewarchCxx.api | 1 + .../api-snapshots/ReactAndroidReleaseCxx.api | 1 + .../api-snapshots/ReactAppleDebugCxx.api | 1 + .../api-snapshots/ReactAppleNewarchCxx.api | 1 + .../api-snapshots/ReactAppleReleaseCxx.api | 1 + .../api-snapshots/ReactCommonDebugCxx.api | 1 + .../api-snapshots/ReactCommonNewarchCxx.api | 1 + .../api-snapshots/ReactCommonReleaseCxx.api | 1 + 34 files changed, 175 insertions(+), 99 deletions(-) create mode 100644 packages/react-native/ReactCommon/jserrorhandler/ErrorUtils.cpp create mode 100644 packages/react-native/ReactCommon/jserrorhandler/ErrorUtils.h create mode 100644 packages/react-native/ReactCommon/react/bridging/React-bridging.podspec diff --git a/packages/react-native/Package.swift b/packages/react-native/Package.swift index d2c487b8970b..422d2b168f33 100644 --- a/packages/react-native/Package.swift +++ b/packages/react-native/Package.swift @@ -198,7 +198,7 @@ let reactCxxReact = RNTarget( path: "ReactCommon/cxxreact", searchPaths: [CallInvokerPath], excludedPaths: ["tests"], - dependencies: [.reactNativeDependencies, .jsi, .reactPerfLogger, .logger, .reactDebug, .reactJsInspector] + dependencies: [.reactNativeDependencies, .jsi, .reactPerfLogger, .logger, .reactDebug, .reactJsErrorHandler, .reactJsInspector] ) /// React-jsitooling.podspec @@ -212,7 +212,7 @@ let reactJsiTooling = RNTarget( let reactJsiExecutor = RNTarget( name: .reactJsiExecutor, path: "ReactCommon/jsiexecutor", - dependencies: [.reactNativeDependencies, .jsi, .reactCxxReact, .reactJsiTooling] + dependencies: [.reactNativeDependencies, .jsi, .reactCxxReact, .reactJsErrorHandler, .reactJsiTooling] ) /// React-hermes.podspec @@ -259,24 +259,15 @@ let reactRuntimeScheduler = RNTarget( name: .reactRuntimeScheduler, path: "ReactCommon/react/renderer/runtimescheduler", excludedPaths: ["tests"], - dependencies: [.reactNativeDependencies, .reactFeatureFlags, .reactCxxReact, .reactPerfLogger, .reactPerformanceTimeline, .reactRendererConsistency, .reactUtils, .reactRuntimeExecutor] + dependencies: [.reactNativeDependencies, .reactFeatureFlags, .reactCxxReact, .reactJsErrorHandler, .reactPerfLogger, .reactPerformanceTimeline, .reactRendererConsistency, .reactUtils, .reactRuntimeExecutor] ) -/// ReactCommon.podspec -/// This target represent the ReactCommon/turbomodule/bridging subspec +/// React-bridging.podspec let reactTurboModuleBridging = RNTarget( name: .reactTurboModuleBridging, path: "ReactCommon/react/bridging", excludedPaths: ["tests"], - dependencies: [.reactNativeDependencies, .reactPerfLogger, .reactCxxReact, .jsi, .logger] -) - -/// React-jserrorhandler.podspec -let reactJsErrorHandler = RNTarget( - name: .reactJsErrorHandler, - path: "ReactCommon/jserrorhandler", - excludedPaths: ["tests"], - dependencies: [.reactNativeDependencies, .jsi, .reactCxxReact, .reactFeatureFlags, .reactDebug, .reactTurboModuleBridging] + dependencies: [.reactNativeDependencies, .reactPerfLogger, .jsi, .logger] ) /// React-graphicsApple @@ -307,7 +298,7 @@ let reactTurboModuleCore = RNTarget( "ReactCommon/react/nativemodule/core/platform/ios", ], excludedPaths: ["platform/android", "iostests"], - dependencies: [.reactNativeDependencies, .reactDebug, .reactFeatureFlags, .reactUtils, .reactPerfLogger, .reactCxxReact, .reactTurboModuleBridging, .yoga, .reactRuntimeExecutor] + dependencies: [.reactNativeDependencies, .reactDebug, .reactJsErrorHandler, .reactFeatureFlags, .reactUtils, .reactPerfLogger, .reactCxxReact, .reactTurboModuleBridging, .yoga, .reactRuntimeExecutor] ) /// React-defaultsnativemodule.podspec @@ -396,6 +387,14 @@ let reactCoreModules = RNTarget( dependencies: [.reactNativeDependencies, .jsi, .yoga, .reactTurboModuleCore, .reactFeatureFlags] ) +/// React-jserrorhandler.podspec +let reactJsErrorHandler = RNTarget( + name: .reactJsErrorHandler, + path: "ReactCommon/jserrorhandler", + excludedPaths: ["tests"], + dependencies: [.reactNativeDependencies, .jsi, .reactFeatureFlags, .reactDebug, .reactTurboModuleBridging] +) + /// React-runtimeCore.podspec /// React-runtimeHermes.podspec let reactRuntime = RNTarget( @@ -904,7 +903,7 @@ extension String { static let reactRCTLinking = "React-RCTLinking" static let reactCoreModules = "React-CoreModules" static let reactRCTAnimatedModuleProvider = "RCTAnimatedModuleProvider" - static let reactTurboModuleBridging = "ReactCommon/turbomodule/bridging" + static let reactTurboModuleBridging = "React-bridging" static let reactTurboModuleCore = "ReactCommon/turbomodule/core" static let reactTurboModuleCoreDefaults = "ReactCommon/turbomodule/core/defaults" static let reactTurboModuleCoreMicrotasks = "ReactCommon/turbomodule/core/microtasks" diff --git a/packages/react-native/ReactCommon/ReactCommon.podspec b/packages/react-native/ReactCommon/ReactCommon.podspec index 83e81864640d..e38c156d12d2 100644 --- a/packages/react-native/ReactCommon/ReactCommon.podspec +++ b/packages/react-native/ReactCommon/ReactCommon.podspec @@ -43,27 +43,16 @@ Pod::Spec.new do |s| s.subspec "turbomodule" do |ss| ss.dependency "React-callinvoker", version ss.dependency "React-perflogger", version - ss.dependency "React-cxxreact", version ss.dependency "React-jsi", version ss.dependency "React-logger", version if use_hermes() ss.dependency "hermes-engine" end - ss.subspec "bridging" do |sss| - sss.dependency "React-jsi", version - sss.source_files = podspec_sources("react/bridging/**/*.{cpp,h}", "react/bridging/**/*.h") - sss.exclude_files = "react/bridging/tests" - sss.header_dir = "react/bridging" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" } - if use_hermes() - sss.dependency "hermes-engine" - end - end - ss.subspec "core" do |sss| sss.source_files = podspec_sources("react/nativemodule/core/ReactCommon/**/*.{cpp,h}", "react/nativemodule/core/ReactCommon/**/*.h") sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_featureflags.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-utils/React_utils.framework/Headers\"" } + sss.dependency "React-cxxreact", version sss.dependency "React-debug", version sss.dependency "React-featureflags", version sss.dependency "React-utils", version diff --git a/packages/react-native/ReactCommon/cxxreact/CMakeLists.txt b/packages/react-native/ReactCommon/cxxreact/CMakeLists.txt index 1c57f04949cc..2a5e973e95b1 100644 --- a/packages/react-native/ReactCommon/cxxreact/CMakeLists.txt +++ b/packages/react-native/ReactCommon/cxxreact/CMakeLists.txt @@ -18,6 +18,7 @@ target_link_libraries(react_cxxreact callinvoker folly_runtime glog + jserrorhandler jsi jsinspector logger diff --git a/packages/react-native/ReactCommon/cxxreact/ErrorUtils.h b/packages/react-native/ReactCommon/cxxreact/ErrorUtils.h index 5d9d5db36827..35f445115074 100644 --- a/packages/react-native/ReactCommon/cxxreact/ErrorUtils.h +++ b/packages/react-native/ReactCommon/cxxreact/ErrorUtils.h @@ -7,36 +7,6 @@ #pragma once -#include +#warning Deprecated: use instead. -namespace facebook::react { - -inline static void handleJSError(jsi::Runtime &runtime, const jsi::JSError &error, bool isFatal) -{ - auto errorUtils = runtime.global().getProperty(runtime, "ErrorUtils"); - if (errorUtils.isUndefined() || !errorUtils.isObject() || - !errorUtils.getObject(runtime).hasProperty(runtime, "reportFatalError") || - !errorUtils.getObject(runtime).hasProperty(runtime, "reportError")) { - // ErrorUtils was not set up. This probably means the bundle didn't - // load properly. - throw jsi::JSError( - runtime, - "ErrorUtils is not set up properly. Something probably went wrong trying to load the JS bundle. Trying to report error " + - error.getMessage(), - error.getStack()); - } - - // TODO(janzer): Rewrite this function to return the processed error - // instead of just reporting it through the native module - if (isFatal) { - auto func = errorUtils.asObject(runtime).getPropertyAsFunction(runtime, "reportFatalError"); - - func.call(runtime, error.value()); - } else { - auto func = errorUtils.asObject(runtime).getPropertyAsFunction(runtime, "reportError"); - - func.call(runtime, error.value()); - } -} - -} // namespace facebook::react +#include diff --git a/packages/react-native/ReactCommon/cxxreact/Instance.cpp b/packages/react-native/ReactCommon/cxxreact/Instance.cpp index 4a67b17c33db..cb204469c303 100644 --- a/packages/react-native/ReactCommon/cxxreact/Instance.cpp +++ b/packages/react-native/ReactCommon/cxxreact/Instance.cpp @@ -9,7 +9,7 @@ #ifndef RCT_REMOVE_LEGACY_ARCH -#include "ErrorUtils.h" +#include #include "JSBigString.h" #include "JSBundleType.h" #include "JSExecutor.h" diff --git a/packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp b/packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp index 4f39102bb4ed..64aa6d640e67 100644 --- a/packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp +++ b/packages/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp @@ -15,7 +15,7 @@ #include #include -#include "ErrorUtils.h" +#include #include "Instance.h" #include "JSBigString.h" #include "MessageQueueThread.h" diff --git a/packages/react-native/ReactCommon/cxxreact/React-cxxreact.podspec b/packages/react-native/ReactCommon/cxxreact/React-cxxreact.podspec index 59fbcf3c593e..ee899bc320cc 100644 --- a/packages/react-native/ReactCommon/cxxreact/React-cxxreact.podspec +++ b/packages/react-native/ReactCommon/cxxreact/React-cxxreact.podspec @@ -40,6 +40,7 @@ Pod::Spec.new do |s| s.dependency "React-callinvoker", version add_dependency(s, "React-runtimeexecutor", :additional_framework_paths => ["platform/ios"]) s.dependency "React-perflogger", version + s.dependency "React-jserrorhandler", version s.dependency "React-jsi", version s.dependency "React-logger", version s.dependency "React-debug", version diff --git a/packages/react-native/ReactCommon/jserrorhandler/ErrorUtils.cpp b/packages/react-native/ReactCommon/jserrorhandler/ErrorUtils.cpp new file mode 100644 index 000000000000..91f951e21210 --- /dev/null +++ b/packages/react-native/ReactCommon/jserrorhandler/ErrorUtils.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include "ErrorUtils.h" + +namespace facebook::react { + +void handleJSError( + jsi::Runtime& runtime, + const jsi::JSError& error, + bool isFatal) { + auto errorUtils = runtime.global().getProperty(runtime, "ErrorUtils"); + if (errorUtils.isUndefined() || !errorUtils.isObject() || + !errorUtils.getObject(runtime).hasProperty(runtime, "reportFatalError") || + !errorUtils.getObject(runtime).hasProperty(runtime, "reportError")) { + // ErrorUtils was not set up. This probably means the bundle didn't + // load properly. + throw jsi::JSError( + runtime, + "ErrorUtils is not set up properly. Something probably went wrong trying to load the JS bundle. Trying to report error " + + error.getMessage(), + error.getStack()); + } + + // TODO(janzer): Rewrite this function to return the processed error + // instead of just reporting it through the native module + if (isFatal) { + auto func = errorUtils.asObject(runtime).getPropertyAsFunction( + runtime, "reportFatalError"); + func.call(runtime, error.value()); + } else { + auto func = errorUtils.asObject(runtime).getPropertyAsFunction( + runtime, "reportError"); + func.call(runtime, error.value()); + } +} + +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/jserrorhandler/ErrorUtils.h b/packages/react-native/ReactCommon/jserrorhandler/ErrorUtils.h new file mode 100644 index 000000000000..f71377e3a9a6 --- /dev/null +++ b/packages/react-native/ReactCommon/jserrorhandler/ErrorUtils.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include + +namespace facebook::react { + +void handleJSError(jsi::Runtime &runtime, const jsi::JSError &error, bool isFatal); + +} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp b/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp index 4dc291ed1a07..8a5f802e305d 100644 --- a/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp +++ b/packages/react-native/ReactCommon/jserrorhandler/JsErrorHandler.cpp @@ -6,12 +6,12 @@ */ #include "JsErrorHandler.h" -#include #include #include #include #include #include +#include "ErrorUtils.h" #include "StackTraceParser.h" using namespace facebook; diff --git a/packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec b/packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec index a5cc33ecc99a..9560c5c66133 100644 --- a/packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +++ b/packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec @@ -28,7 +28,7 @@ Pod::Spec.new do |s| s.platforms = min_supported_versions s.source = source s.header_dir = "jserrorhandler" - s.source_files = podspec_sources(["JsErrorHandler.{cpp,h}", "StackTraceParser.{cpp,h}"], ["JsErrorHandler.h", "StackTraceParser.h"]) + s.source_files = podspec_sources(["ErrorUtils.{cpp,h}", "JsErrorHandler.{cpp,h}", "StackTraceParser.{cpp,h}"], ["ErrorUtils.h", "JsErrorHandler.h", "StackTraceParser.h"]) s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() @@ -37,8 +37,7 @@ Pod::Spec.new do |s| resolve_use_frameworks(s, header_mappings_dir: '../', module_name: "React_jserrorhandler") s.dependency "React-jsi" - s.dependency "React-cxxreact" - s.dependency "ReactCommon/turbomodule/bridging" + s.dependency "React-bridging" add_dependency(s, "React-featureflags") add_dependency(s, "React-debug") diff --git a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp index fc9723c54fc0..7486aa17ad68 100644 --- a/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp +++ b/packages/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp @@ -7,13 +7,13 @@ #include "jsireact/JSIExecutor.h" -#include #include #include #include #include #include #include +#include #include #include #include diff --git a/packages/react-native/ReactCommon/react/bridging/React-bridging.podspec b/packages/react-native/ReactCommon/react/bridging/React-bridging.podspec new file mode 100644 index 000000000000..4a168df7f620 --- /dev/null +++ b/packages/react-native/ReactCommon/react/bridging/React-bridging.podspec @@ -0,0 +1,45 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +require "json" + +package = JSON.parse(File.read(File.join(__dir__, "..", "..", "..", "package.json"))) +version = package['version'] + +source = { :git => 'https://github.com/facebook/react-native.git' } +if version == '1000.0.0' + # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in. + source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1") +else + source[:tag] = "v#{version}" +end + +Pod::Spec.new do |s| + s.name = "React-bridging" + s.version = version + s.summary = "-" + s.homepage = "https://reactnative.dev/" + s.license = package["license"] + s.author = "Meta Platforms, Inc. and its affiliates" + s.platforms = min_supported_versions + s.source = source + s.source_files = podspec_sources("**/*.{cpp,h}", "**/*.h") + s.exclude_files = "tests/**/*" + s.header_dir = "react/bridging" + s.pod_target_xcconfig = { + "USE_HEADERMAP" => "YES", + "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(), + "DEFINES_MODULE" => "YES" + } + + s.dependency "React-jsi" + s.dependency "React-callinvoker" + s.dependency "React-timing" + s.dependency "React-logger" + s.dependency "React-perflogger" + + add_rn_third_party_dependencies(s) + add_rncore_dependency(s) +end diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec index 7fd2869614b6..92bf47ef5764 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec @@ -37,7 +37,7 @@ Pod::Spec.new do |s| s.source_files = podspec_sources("ReactCommon/**/*.{mm,cpp,h}", "ReactCommon/**/*.{h}") s.dependency "ReactCommon/turbomodule/core" - s.dependency "ReactCommon/turbomodule/bridging" + s.dependency "React-bridging" s.dependency "React-callinvoker" s.dependency "React-Core" s.dependency "React-cxxreact" diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt index 30d11bacb3a8..ef54ad28d144 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt @@ -15,6 +15,7 @@ target_include_directories(react_renderer_runtimescheduler PUBLIC ${REACT_COMMON target_link_libraries(react_renderer_runtimescheduler callinvoker + jserrorhandler jsi react_debug react_performance_timeline diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec index 56823e61d623..83e39f79d504 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec @@ -48,6 +48,7 @@ Pod::Spec.new do |s| s.dependency "React-featureflags" s.dependency "React-timing" s.dependency "React-jsi" + s.dependency "React-jserrorhandler" s.dependency "React-performancetimeline" s.dependency "React-rendererconsistency" add_dependency(s, "React-debug") diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp index 39cd56264700..57dce92f8470 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp @@ -11,8 +11,8 @@ #include "RuntimeScheduler_Legacy.h" #endif -#include #include +#include #ifndef RCT_REMOVE_LEGACY_ARCH #include #endif diff --git a/packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp b/packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp index 1372f2563477..278a64f5a010 100644 --- a/packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp +++ b/packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp @@ -8,12 +8,12 @@ #include "ReactInstance.h" #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb b/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb index ad4a5a62c3ad..3dde2a593588 100644 --- a/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb +++ b/packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb @@ -266,7 +266,7 @@ def get_podspec_no_fabric_no_script "React-Core": [], "React-jsi": [], "React-jsiexecutor": [], - "ReactCommon/turbomodule/bridging": [], + "React-bridging": [], "ReactCommon/turbomodule/core": [], "hermes-engine": [], "React-NativeModulesApple": [], diff --git a/packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb b/packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb index b062c6e3f243..ba95cfc3331f 100644 --- a/packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb +++ b/packages/react-native/scripts/cocoapods/__tests__/new_architecture-test.rb @@ -152,7 +152,7 @@ def test_installModulesDependencies_whenNewArchEnabledAndNewArchAndNoSearchPaths { :dependency_name => "ReactCodegen" }, { :dependency_name => "RCTRequired" }, { :dependency_name => "RCTTypeSafety" }, - { :dependency_name => "ReactCommon/turbomodule/bridging" }, + { :dependency_name => "React-bridging" }, { :dependency_name => "ReactCommon/turbomodule/core" }, { :dependency_name => "React-NativeModulesApple" }, { :dependency_name => "Yoga" }, @@ -203,7 +203,7 @@ def test_installModulesDependencies_whenNewArchDisabledAndSearchPathsAndCompiler { :dependency_name => "ReactCodegen" }, { :dependency_name => "RCTRequired" }, { :dependency_name => "RCTTypeSafety" }, - { :dependency_name => "ReactCommon/turbomodule/bridging" }, + { :dependency_name => "React-bridging" }, { :dependency_name => "ReactCommon/turbomodule/core" }, { :dependency_name => "React-NativeModulesApple" }, { :dependency_name => "Yoga" }, diff --git a/packages/react-native/scripts/cocoapods/new_architecture.rb b/packages/react-native/scripts/cocoapods/new_architecture.rb index 3873632a7d7b..e4353427a977 100644 --- a/packages/react-native/scripts/cocoapods/new_architecture.rb +++ b/packages/react-native/scripts/cocoapods/new_architecture.rb @@ -119,7 +119,7 @@ def self.install_modules_dependencies(spec, new_arch_enabled, folly_version = He spec.dependency "RCTRequired" spec.dependency "RCTTypeSafety" - spec.dependency "ReactCommon/turbomodule/bridging" + spec.dependency "React-bridging" spec.dependency "ReactCommon/turbomodule/core" spec.dependency "React-NativeModulesApple" spec.dependency "Yoga" diff --git a/packages/react-native/scripts/codegen/__tests__/__snapshots__/generate-artifacts-executor-test.js.snap b/packages/react-native/scripts/codegen/__tests__/__snapshots__/generate-artifacts-executor-test.js.snap index 40e82c15eff7..9ce1c901040e 100644 --- a/packages/react-native/scripts/codegen/__tests__/__snapshots__/generate-artifacts-executor-test.js.snap +++ b/packages/react-native/scripts/codegen/__tests__/__snapshots__/generate-artifacts-executor-test.js.snap @@ -465,7 +465,7 @@ Pod::Spec.new do |s| s.dependency \\"RCTTypeSafety\\" s.dependency \\"React-Core\\" s.dependency \\"React-jsi\\" - s.dependency \\"ReactCommon/turbomodule/bridging\\" + s.dependency \\"React-bridging\\" s.dependency \\"ReactCommon/turbomodule/core\\" s.dependency \\"React-NativeModulesApple\\" s.dependency 'React-graphics' @@ -948,7 +948,7 @@ Pod::Spec.new do |s| s.dependency \\"RCTTypeSafety\\" s.dependency \\"React-Core\\" s.dependency \\"React-jsi\\" - s.dependency \\"ReactCommon/turbomodule/bridging\\" + s.dependency \\"React-bridging\\" s.dependency \\"ReactCommon/turbomodule/core\\" s.dependency \\"React-NativeModulesApple\\" s.dependency 'React-graphics' diff --git a/packages/react-native/scripts/codegen/templates/ReactCodegen.podspec.template b/packages/react-native/scripts/codegen/templates/ReactCodegen.podspec.template index de434d4b91d8..5909a466ee82 100644 --- a/packages/react-native/scripts/codegen/templates/ReactCodegen.podspec.template +++ b/packages/react-native/scripts/codegen/templates/ReactCodegen.podspec.template @@ -69,7 +69,7 @@ Pod::Spec.new do |s| s.dependency "RCTTypeSafety" s.dependency "React-Core" s.dependency "React-jsi" - s.dependency "ReactCommon/turbomodule/bridging" + s.dependency "React-bridging" s.dependency "ReactCommon/turbomodule/core" s.dependency "React-NativeModulesApple" s.dependency 'React-graphics' diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb index f9dac08218be..4d3e3362bf60 100644 --- a/packages/react-native/scripts/react_native_pods.rb +++ b/packages/react-native/scripts/react_native_pods.rb @@ -161,6 +161,7 @@ def use_react_native! ( pod 'React-domnativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/dom" pod 'React-defaultsnativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/defaults" pod 'React-Mapbuffer', :path => "#{prefix}/ReactCommon" + pod 'React-bridging', :path => "#{prefix}/ReactCommon/react/bridging", :modular_headers => true pod 'React-jserrorhandler', :path => "#{prefix}/ReactCommon/jserrorhandler" pod 'RCTDeprecation', :path => "#{prefix}/ReactApple/Libraries/RCTFoundation/RCTDeprecation" pod 'React-RCTFBReactNativeSpec', :path => "#{prefix}/React" diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index d02e59f6e14a..fb23d26c3876 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -40,7 +40,7 @@ PODS: - React-rendererdebug - React-utils - ReactCodegen - - ReactCommon/turbomodule/bridging + - React-bridging - ReactCommon/turbomodule/core - SocketRocket - Yoga @@ -68,7 +68,7 @@ PODS: - React-rendererdebug - React-utils - ReactCodegen - - ReactCommon/turbomodule/bridging + - React-bridging - ReactCommon/turbomodule/core - SocketRocket - Yoga @@ -114,6 +114,20 @@ PODS: - React-RCTSettings (= 1000.0.0) - React-RCTText (= 1000.0.0) - React-RCTVibration (= 1000.0.0) + - React-bridging (1000.0.0): + - boost + - DoubleConversion + - fast_float + - fmt + - glog + - RCT-Folly + - RCT-Folly/Fabric + - React-callinvoker + - React-jsi + - React-logger + - React-perflogger + - React-timing + - SocketRocket - React-callinvoker (1000.0.0) - React-Core (1000.0.0): - boost @@ -1704,11 +1718,11 @@ PODS: - hermes-engine - RCT-Folly - RCT-Folly/Fabric + - React-bridging - React-cxxreact - React-debug - React-featureflags - React-jsi - - ReactCommon/turbomodule/bridging - SocketRocket - React-jsi (1000.0.0): - boost @@ -1854,7 +1868,7 @@ PODS: - React-jsinspector - React-jsinspectorcdp - React-runtimeexecutor - - ReactCommon/turbomodule/bridging + - React-bridging - ReactCommon/turbomodule/core - SocketRocket - React-oscompat (1000.0.0) @@ -2311,7 +2325,7 @@ PODS: - React-RCTAppDelegate - React-rendererdebug - React-utils - - ReactCommon/turbomodule/bridging + - React-bridging - ReactCommon/turbomodule/core - SocketRocket - ReactCommon (1000.0.0): @@ -2354,24 +2368,8 @@ PODS: - React-jsi (= 1000.0.0) - React-logger (= 1000.0.0) - React-perflogger (= 1000.0.0) - - ReactCommon/turbomodule/bridging (= 1000.0.0) - ReactCommon/turbomodule/core (= 1000.0.0) - SocketRocket - - ReactCommon/turbomodule/bridging (1000.0.0): - - boost - - DoubleConversion - - fast_float - - fmt - - glog - - hermes-engine - - RCT-Folly - - RCT-Folly/Fabric - - React-callinvoker (= 1000.0.0) - - React-cxxreact (= 1000.0.0) - - React-jsi (= 1000.0.0) - - React-logger (= 1000.0.0) - - React-perflogger (= 1000.0.0) - - SocketRocket - ReactCommon/turbomodule/core (1000.0.0): - boost - DoubleConversion @@ -2414,7 +2412,7 @@ PODS: - React-rendererdebug - React-utils - ReactCodegen - - ReactCommon/turbomodule/bridging + - React-bridging - ReactCommon/turbomodule/core - SocketRocket - Yoga @@ -2439,6 +2437,7 @@ DEPENDENCIES: - RCTSwiftUIWrapper (from `../react-native/ReactApple/RCTSwiftUIWrapper`) - RCTTypeSafety (from `../react-native/Libraries/TypeSafety`) - React (from `../react-native/`) + - React-bridging (from `../react-native/ReactCommon/react/bridging`) - React-callinvoker (from `../react-native/ReactCommon/callinvoker`) - React-Core (from `../react-native/`) - React-Core/RCTWebSocket (from `../react-native/`) @@ -2545,6 +2544,8 @@ EXTERNAL SOURCES: :path: "../react-native/Libraries/TypeSafety" React: :path: "../react-native/" + React-bridging: + :path: "../react-native/ReactCommon/react/bridging" React-callinvoker: :path: "../react-native/ReactCommon/callinvoker" React-Core: @@ -2690,6 +2691,7 @@ SPEC CHECKSUMS: RCTRequired: a00614e2da5344c2cda3d287050b6cee00e21dc6 RCTTypeSafety: 459a16418c6b413060d35434ba3e83f5b0bd2651 React: 170a01a19ba2525ab7f11243e2df6b19bf268093 + React-bridging: 0000000000000000000000000000000000000000 React-callinvoker: f08f425e4043cd1998a158b6e39a6aed1fd1d718 React-Core: d35c5cf69898fd026e5cd93a0454b1d42e999d3e React-CoreModules: 3ce1d43f6cc37f43759ec543ce1c0010080f1de1 diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api index a85c1f0c88b4..729af684a4eb 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api @@ -1130,6 +1130,7 @@ void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, c void facebook::react::fromRawValueShared(const facebook::react::ContextContainer& contextContainer, int32_t surfaceId, const facebook::react::RawValue& value, facebook::react::SharedColor& result, facebook::react::parsePlatformColorFn parsePlatformColor); void facebook::react::fromString(const std::string& string, facebook::react::AccessibilityTraits& result); void facebook::react::g_setNativeAnimatedNowTimestampFunction(facebook::react::TimePointFunction nowFunction); +void facebook::react::handleJSError(facebook::jsi::Runtime& runtime, const facebook::jsi::JSError& error, bool isFatal); void facebook::react::parseProcessedBackgroundImage(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedBoxShadow(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedFilter(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api index 837ff53d1b61..e8c8352dcff6 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api @@ -1126,6 +1126,7 @@ void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, c void facebook::react::fromRawValueShared(const facebook::react::ContextContainer& contextContainer, int32_t surfaceId, const facebook::react::RawValue& value, facebook::react::SharedColor& result, facebook::react::parsePlatformColorFn parsePlatformColor); void facebook::react::fromString(const std::string& string, facebook::react::AccessibilityTraits& result); void facebook::react::g_setNativeAnimatedNowTimestampFunction(facebook::react::TimePointFunction nowFunction); +void facebook::react::handleJSError(facebook::jsi::Runtime& runtime, const facebook::jsi::JSError& error, bool isFatal); void facebook::react::parseProcessedBackgroundImage(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedBoxShadow(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedFilter(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api index 3a0800477f40..2029db497618 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api @@ -1130,6 +1130,7 @@ void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, c void facebook::react::fromRawValueShared(const facebook::react::ContextContainer& contextContainer, int32_t surfaceId, const facebook::react::RawValue& value, facebook::react::SharedColor& result, facebook::react::parsePlatformColorFn parsePlatformColor); void facebook::react::fromString(const std::string& string, facebook::react::AccessibilityTraits& result); void facebook::react::g_setNativeAnimatedNowTimestampFunction(facebook::react::TimePointFunction nowFunction); +void facebook::react::handleJSError(facebook::jsi::Runtime& runtime, const facebook::jsi::JSError& error, bool isFatal); void facebook::react::parseProcessedBackgroundImage(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedBoxShadow(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedFilter(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index 5ef595005d8a..090dee9fc46c 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -3964,6 +3964,7 @@ void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, c void facebook::react::fromRawValueShared(const facebook::react::ContextContainer& contextContainer, int32_t surfaceId, const facebook::react::RawValue& value, facebook::react::SharedColor& result, facebook::react::parsePlatformColorFn parsePlatformColor); void facebook::react::fromString(const std::string& string, facebook::react::AccessibilityTraits& result); void facebook::react::g_setNativeAnimatedNowTimestampFunction(facebook::react::TimePointFunction nowFunction); +void facebook::react::handleJSError(facebook::jsi::Runtime& runtime, const facebook::jsi::JSError& error, bool isFatal); void facebook::react::installLegacyUIManagerConstantsProviderBinding(facebook::jsi::Runtime& runtime); void facebook::react::parseProcessedBackgroundImage(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedBoxShadow(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api index 80f834aa2350..0d52c6bb92e6 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api @@ -3949,6 +3949,7 @@ void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, c void facebook::react::fromRawValueShared(const facebook::react::ContextContainer& contextContainer, int32_t surfaceId, const facebook::react::RawValue& value, facebook::react::SharedColor& result, facebook::react::parsePlatformColorFn parsePlatformColor); void facebook::react::fromString(const std::string& string, facebook::react::AccessibilityTraits& result); void facebook::react::g_setNativeAnimatedNowTimestampFunction(facebook::react::TimePointFunction nowFunction); +void facebook::react::handleJSError(facebook::jsi::Runtime& runtime, const facebook::jsi::JSError& error, bool isFatal); void facebook::react::installLegacyUIManagerConstantsProviderBinding(facebook::jsi::Runtime& runtime); void facebook::react::parseProcessedBackgroundImage(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedBoxShadow(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index bc1b98fae6e6..43ddc35443b3 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -3964,6 +3964,7 @@ void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, c void facebook::react::fromRawValueShared(const facebook::react::ContextContainer& contextContainer, int32_t surfaceId, const facebook::react::RawValue& value, facebook::react::SharedColor& result, facebook::react::parsePlatformColorFn parsePlatformColor); void facebook::react::fromString(const std::string& string, facebook::react::AccessibilityTraits& result); void facebook::react::g_setNativeAnimatedNowTimestampFunction(facebook::react::TimePointFunction nowFunction); +void facebook::react::handleJSError(facebook::jsi::Runtime& runtime, const facebook::jsi::JSError& error, bool isFatal); void facebook::react::installLegacyUIManagerConstantsProviderBinding(facebook::jsi::Runtime& runtime); void facebook::react::parseProcessedBackgroundImage(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedBoxShadow(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); diff --git a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api index 4c3b5750c2a3..d88824421237 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api @@ -690,6 +690,7 @@ void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, c void facebook::react::fromRawValueShared(const facebook::react::ContextContainer& contextContainer, int32_t surfaceId, const facebook::react::RawValue& value, facebook::react::SharedColor& result, facebook::react::parsePlatformColorFn parsePlatformColor); void facebook::react::fromString(const std::string& string, facebook::react::AccessibilityTraits& result); void facebook::react::g_setNativeAnimatedNowTimestampFunction(facebook::react::TimePointFunction nowFunction); +void facebook::react::handleJSError(facebook::jsi::Runtime& runtime, const facebook::jsi::JSError& error, bool isFatal); void facebook::react::parseProcessedBackgroundImage(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedBoxShadow(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedFilter(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); diff --git a/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api index 2492570e8064..c7d9e8cc46b7 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api @@ -687,6 +687,7 @@ void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, c void facebook::react::fromRawValueShared(const facebook::react::ContextContainer& contextContainer, int32_t surfaceId, const facebook::react::RawValue& value, facebook::react::SharedColor& result, facebook::react::parsePlatformColorFn parsePlatformColor); void facebook::react::fromString(const std::string& string, facebook::react::AccessibilityTraits& result); void facebook::react::g_setNativeAnimatedNowTimestampFunction(facebook::react::TimePointFunction nowFunction); +void facebook::react::handleJSError(facebook::jsi::Runtime& runtime, const facebook::jsi::JSError& error, bool isFatal); void facebook::react::parseProcessedBackgroundImage(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedBoxShadow(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedFilter(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); diff --git a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api index 6f46c2322b79..33a85e374011 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api @@ -690,6 +690,7 @@ void facebook::react::fromRawValue(const facebook::react::PropsParserContext&, c void facebook::react::fromRawValueShared(const facebook::react::ContextContainer& contextContainer, int32_t surfaceId, const facebook::react::RawValue& value, facebook::react::SharedColor& result, facebook::react::parsePlatformColorFn parsePlatformColor); void facebook::react::fromString(const std::string& string, facebook::react::AccessibilityTraits& result); void facebook::react::g_setNativeAnimatedNowTimestampFunction(facebook::react::TimePointFunction nowFunction); +void facebook::react::handleJSError(facebook::jsi::Runtime& runtime, const facebook::jsi::JSError& error, bool isFatal); void facebook::react::parseProcessedBackgroundImage(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedBoxShadow(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result); void facebook::react::parseProcessedFilter(const facebook::react::PropsParserContext& context, const facebook::react::RawValue& value, std::vector& result);