Skip to content

Commit 5a3759e

Browse files
javachemeta-codesync[bot]
authored andcommitted
Forward declare TurboModule in TurboModuleProvider (#54577)
Summary: Pull Request resolved: #54577 Forward-declare so these headers can be parsed in targets which disable exceptions. Changelog: [Internal] Reviewed By: shwanton Differential Revision: D87333893 fbshipit-source-id: e161b89f4cfadcefcfe5966eb7f21036829635a9
1 parent 0ee4a2d commit 5a3759e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ ReactInstance::ReactInstance(
9595
jsErrorHandler->handleError(jsiRuntime, originalError, true);
9696
} catch (std::exception& ex) {
9797
jsi::JSError error(
98-
jsiRuntime, std::string("Non-js exception: ") + ex.what());
98+
jsiRuntime, std::string("Non-JS exception: ") + ex.what());
9999
jsErrorHandler->handleError(jsiRuntime, error, true);
100100
}
101101
});

packages/react-native/ReactCxxPlatform/react/nativemodule/TurboModuleProvider.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77

88
#pragma once
99

10-
#include <ReactCommon/CallInvoker.h>
11-
#include <ReactCommon/TurboModule.h>
12-
1310
#include <functional>
11+
#include <memory>
1412
#include <string>
1513
#include <vector>
1614

1715
namespace facebook::react {
1816

17+
class CallInvoker;
18+
class TurboModule;
19+
1920
using TurboModuleProvider =
2021
std::function<std::shared_ptr<TurboModule>(const std::string &name, const std::shared_ptr<CallInvoker> &jsInvoker)>;
2122

0 commit comments

Comments
 (0)