react-native-windows 0.77.0 → 0.78.0-preview.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.flowconfig +1 -1
- package/Chakra/ChakraTracing.cpp +1 -1
- package/Libraries/Animated/animations/Animation.js +22 -1
- package/Libraries/Animated/animations/DecayAnimation.js +1 -0
- package/Libraries/Animated/animations/SpringAnimation.js +1 -0
- package/Libraries/Animated/animations/TimingAnimation.js +1 -0
- package/Libraries/Animated/nodes/AnimatedAddition.js +9 -2
- package/Libraries/Animated/nodes/AnimatedColor.js +4 -1
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +10 -2
- package/Libraries/Animated/nodes/AnimatedDivision.js +9 -2
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +5 -1
- package/Libraries/Animated/nodes/AnimatedModulo.js +5 -2
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +9 -2
- package/Libraries/Animated/nodes/AnimatedNode.js +25 -46
- package/Libraries/Animated/nodes/AnimatedObject.js +9 -2
- package/Libraries/Animated/nodes/AnimatedProps.js +5 -1
- package/Libraries/Animated/nodes/AnimatedStyle.js +5 -1
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +9 -2
- package/Libraries/Animated/nodes/AnimatedTracking.js +5 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +5 -1
- package/Libraries/Animated/nodes/AnimatedValue.js +49 -4
- package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -1
- package/Libraries/Animated/useAnimatedProps.js +0 -43
- package/Libraries/Components/Button.windows.js +3 -0
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +3 -1
- package/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +21 -0
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +59 -0
- package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +29 -0
- package/Libraries/Components/Pressable/Pressable.windows.js +3 -0
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +5 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +6 -0
- package/Libraries/Components/TextInput/TextInput.js +6 -0
- package/Libraries/Components/TextInput/TextInput.windows.js +9 -0
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +2 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +2 -0
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +2 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +2 -0
- package/Libraries/Components/View/View.windows.js +3 -0
- package/Libraries/Components/View/ViewAccessibility.d.ts +7 -2
- package/Libraries/Components/View/ViewAccessibility.windows.js +1 -0
- package/Libraries/Components/View/ViewPropTypes.d.ts +0 -7
- package/Libraries/Components/View/ViewPropTypes.js +0 -9
- package/Libraries/Components/View/ViewPropTypes.windows.js +1 -9
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/setUpBatchedBridge.js +1 -16
- package/Libraries/EventEmitter/RCTEventEmitter.js +2 -6
- package/Libraries/Image/AssetSourceResolver.js +11 -0
- package/Libraries/Image/AssetSourceResolver.windows.js +11 -0
- package/Libraries/Image/Image.windows.js +2 -0
- package/Libraries/Inspector/BorderBox.js +26 -14
- package/Libraries/Inspector/BoxInspector.js +60 -42
- package/Libraries/Inspector/ElementBox.js +55 -48
- package/Libraries/Inspector/StyleInspector.js +36 -30
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Lists/FlatList.d.ts +1 -1
- package/Libraries/Modal/Modal.js +2 -0
- package/Libraries/Modal/Modal.windows.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +0 -2
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +0 -2
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +0 -2
- package/Libraries/Network/RCTNetworking.android.js +24 -16
- package/Libraries/Network/RCTNetworking.ios.js +1 -46
- package/Libraries/Network/RCTNetworking.windows.js +1 -46
- package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +57 -0
- package/Libraries/ReactNative/UIManagerProperties.js +3 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +15828 -26461
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3907 -2560
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4399 -2878
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16102 -26908
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +4034 -2695
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4535 -3045
- package/Libraries/Renderer/shims/ReactNativeTypes.js +5 -6
- package/Libraries/StyleSheet/processTransform.js +6 -0
- package/Libraries/Text/Text.d.ts +6 -1
- package/Libraries/Text/Text.windows.js +4 -0
- package/Libraries/Text/TextProps.js +2 -2
- package/Libraries/Text/TextProps.windows.js +3 -2
- package/Libraries/Utilities/BackHandler.android.js +5 -4
- package/Libraries/Utilities/BackHandler.ios.js +4 -5
- package/Libraries/Utilities/BackHandler.windows.js +5 -4
- package/Microsoft.ReactNative/CompositionComponentView.idl +13 -1
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +0 -1
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +0 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +92 -17
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +9 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +13 -33
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +1 -3
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +43 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +12 -10
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +11 -9
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +191 -329
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +3 -61
- package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.cpp +66 -0
- package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.h +52 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +21 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +7 -4
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +79 -19
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +12 -6
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +71 -17
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +16 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +5 -10
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +4 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +138 -110
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +27 -27
- package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +38 -33
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +0 -2
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +5 -16
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +0 -3
- package/Microsoft.ReactNative/Fabric/ImageManager.cpp +9 -0
- package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +0 -2
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +1 -1
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +5 -0
- package/Microsoft.ReactNative/IReactContext.cpp +2 -2
- package/Microsoft.ReactNative/IReactContext.h +1 -1
- package/Microsoft.ReactNative/IReactContext.idl +2 -2
- package/Microsoft.ReactNative/IReactPackageBuilder.idl +3 -3
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +97 -87
- package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +4 -0
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +9 -4
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +1 -1
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +32 -35
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.h +7 -4
- package/Microsoft.ReactNative/Modules/AppStateModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +2 -2
- package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +2 -2
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +3 -3
- package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +7 -5
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -1
- package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +10 -10
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +24 -24
- package/Microsoft.ReactNative/Modules/Timing.cpp +2 -2
- package/Microsoft.ReactNative/ReactHost/IReactInstance.h +5 -0
- package/Microsoft.ReactNative/ReactHost/React.h +0 -3
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +39 -16
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +4 -2
- package/Microsoft.ReactNative/ReactNativeHost.cpp +9 -4
- package/Microsoft.ReactNative/ReactNativeIsland.idl +5 -1
- package/Microsoft.ReactNative/ReactPackageBuilder.cpp +3 -3
- package/Microsoft.ReactNative/ReactPackageBuilder.h +4 -4
- package/Microsoft.ReactNative/Utils/Helpers.cpp +0 -2
- package/Microsoft.ReactNative/Views/DebuggingOverlayViewManager.cpp +0 -1
- package/Microsoft.ReactNative/Views/DevMenu.cpp +6 -6
- package/Microsoft.ReactNative/Views/DevMenu.h +1 -1
- package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +2 -2
- package/Microsoft.ReactNative/Views/ViewPanel.cpp +1 -1
- package/Microsoft.ReactNative/Views/ViewViewManager.cpp +2 -2
- package/Microsoft.ReactNative/XamlUIService.cpp +13 -7
- package/Microsoft.ReactNative/XamlUIService.h +4 -1
- package/Microsoft.ReactNative/XamlUIService.idl +2 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +6 -2
- package/Microsoft.ReactNative.Cxx/ReactContext.h +1 -1
- package/Microsoft.ReactNative.Cxx/XamlUtils.h +12 -0
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/React.Cpp.props +3 -0
- package/PropertySheets/WebView2.props +1 -1
- package/PropertySheets/WinUI.props +5 -4
- package/ReactCommon/ReactCommon.vcxproj +5 -1
- package/ReactCommon/ReactCommon.vcxproj.filters +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +3 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +3 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +91 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +1 -12
- package/{Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h → ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/textinput/TextInputState.h} +37 -35
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +1 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +4 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/ImageRequestParams.h +30 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/runtimescheduler/SchedulerPriorityUtils.h +4 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/primitives.h +179 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +43 -57
- package/Shared/HermesRuntimeHolder.cpp +2 -2
- package/Shared/Shared.vcxitems +8 -14
- package/Shared/Shared.vcxitems.filters +4 -16
- package/Shared/Threading/BatchingQueueThread.cpp +3 -3
- package/codegen/NativeCPUTimeSpec.g.h +41 -0
- package/codegen/NativeFantomSpec.g.h +78 -0
- package/codegen/NativePerformanceSpec.g.h +31 -43
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +84 -84
- package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +212 -0
- package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +295 -0
- package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +200 -0
- package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +224 -0
- package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +250 -0
- package/codegen/react/components/rnwcore/AndroidSwitch.g.h +267 -0
- package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +234 -0
- package/codegen/react/components/rnwcore/InputAccessory.g.h +200 -0
- package/codegen/react/components/rnwcore/ModalHostView.g.h +283 -0
- package/codegen/react/components/rnwcore/PullToRefreshView.g.h +246 -0
- package/codegen/react/components/rnwcore/SafeAreaView.g.h +197 -0
- package/codegen/react/components/rnwcore/Switch.g.h +263 -0
- package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +200 -0
- package/codegen/rnwcoreJSI-generated.cpp +90 -57
- package/codegen/rnwcoreJSI.h +241 -104
- package/index.js +5 -0
- package/index.windows.js +5 -0
- package/just-task.js +1 -1
- package/package.json +25 -26
- package/src/private/animated/NativeAnimatedValidation.js +1 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +33 -27
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +5 -5
- package/src/private/renderer/errorhandling/ErrorHandlers.js +12 -55
- package/src/private/specs/modules/{NativeJSCSamplingProfiler.js → NativeCPUTime.js} +7 -2
- package/src/private/specs/modules/NativeFantom.js +37 -0
- package/src/private/utilities/ensureInstance.js +21 -0
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +49 -6
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +17 -9
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +11 -11
- package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +1 -1
- package/src/private/webapis/intersectionobserver/IntersectionObserverManager.js +1 -1
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
- package/src/private/webapis/performance/Performance.js +0 -12
- package/src/private/webapis/performance/specs/NativePerformance.js +0 -11
- package/types/index.d.ts +1 -0
- package/Libraries/HeapCapture/HeapCapture.js +0 -29
- package/Libraries/HeapCapture/NativeJSCHeapCapture.js +0 -13
- package/Libraries/Performance/NativeJSCSamplingProfiler.js +0 -13
- package/Libraries/Performance/SamplingProfiler.js +0 -39
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +0 -334
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentDescriptor.h +0 -39
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.cpp +0 -18
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.h +0 -39
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -34
- package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.cpp +0 -53
- package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.h +0 -26
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/LayoutableShadowNode.cpp +0 -363
- package/codegen/NativeJSCSamplingProfilerSpec.g.h +0 -35
- package/src/private/webapis/dom/nodes/specs/__mocks__/NativeDOMMock.js +0 -413
- package/src/private/webapis/intersectionobserver/specs/__mocks__/NativeIntersectionObserver.js +0 -181
- package/src/private/webapis/mutationobserver/specs/__mocks__/NativeMutationObserver.js +0 -327
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
#include <cxxreact/JSBigString.h>
|
|
13
13
|
#include <cxxreact/JSExecutor.h>
|
|
14
14
|
#include <cxxreact/ReactMarker.h>
|
|
15
|
-
#include <cxxreact/
|
|
15
|
+
#include <cxxreact/TraceSection.h>
|
|
16
16
|
#include <glog/logging.h>
|
|
17
17
|
#include <jsi/JSIDynamic.h>
|
|
18
18
|
#include <jsi/instrumentation.h>
|
|
@@ -57,62 +57,48 @@ ReactInstance::ReactInstance(
|
|
|
57
57
|
timerManager_(std::move(timerManager)),
|
|
58
58
|
jsErrorHandler_(std::make_shared<JsErrorHandler>(std::move(onJsError))),
|
|
59
59
|
parentInspectorTarget_(parentInspectorTarget) {
|
|
60
|
-
RuntimeExecutor runtimeExecutor =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
jsErrorHandler_](auto callback) {
|
|
67
|
-
if (weakRuntime.expired()) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* If a fatal error was caught while executing the main bundle, assume the
|
|
73
|
-
* js runtime is invalid. And stop executing any more js.
|
|
74
|
-
*/
|
|
75
|
-
if (!jsErrorHandler->isRuntimeReady() &&
|
|
76
|
-
jsErrorHandler->hasHandledFatalError()) {
|
|
77
|
-
LOG(INFO)
|
|
78
|
-
<< "RuntimeExecutor: Detected fatal error. Dropping work on non-js thread."
|
|
79
|
-
<< std::endl;
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (auto jsThread = weakJsThread.lock()) {
|
|
84
|
-
jsThread->runOnQueue([jsErrorHandler,
|
|
85
|
-
weakRuntime,
|
|
86
|
-
weakTimerManager,
|
|
87
|
-
callback = std::move(callback)]() {
|
|
88
|
-
auto runtime = weakRuntime.lock();
|
|
89
|
-
if (!runtime) {
|
|
60
|
+
RuntimeExecutor runtimeExecutor =
|
|
61
|
+
[weakRuntime = std::weak_ptr(runtime_),
|
|
62
|
+
weakTimerManager = std::weak_ptr(timerManager_),
|
|
63
|
+
weakJsThread = std::weak_ptr(jsMessageQueueThread_),
|
|
64
|
+
jsErrorHandler = jsErrorHandler_](auto callback) {
|
|
65
|
+
if (weakRuntime.expired()) {
|
|
90
66
|
return;
|
|
91
67
|
}
|
|
92
68
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (ReactNativeFeatureFlags::disableEventLoopOnBridgeless()) {
|
|
102
|
-
if (auto timerManager = weakTimerManager.lock()) {
|
|
103
|
-
timerManager->callReactNativeMicrotasks(jsiRuntime);
|
|
69
|
+
if (auto jsThread = weakJsThread.lock()) {
|
|
70
|
+
jsThread->runOnQueue([jsErrorHandler,
|
|
71
|
+
weakRuntime,
|
|
72
|
+
weakTimerManager,
|
|
73
|
+
callback = std::move(callback)]() {
|
|
74
|
+
auto runtime = weakRuntime.lock();
|
|
75
|
+
if (!runtime) {
|
|
76
|
+
return;
|
|
104
77
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
jsiRuntime
|
|
111
|
-
|
|
78
|
+
|
|
79
|
+
jsi::Runtime& jsiRuntime = runtime->getRuntime();
|
|
80
|
+
TraceSection s("ReactInstance::_runtimeExecutor[Callback]");
|
|
81
|
+
try {
|
|
82
|
+
ShadowNode::setUseRuntimeShadowNodeReferenceUpdateOnThread(true);
|
|
83
|
+
callback(jsiRuntime);
|
|
84
|
+
|
|
85
|
+
// If we have first-class support for microtasks,
|
|
86
|
+
// they would've been called as part of the previous callback.
|
|
87
|
+
if (ReactNativeFeatureFlags::disableEventLoopOnBridgeless()) {
|
|
88
|
+
if (auto timerManager = weakTimerManager.lock()) {
|
|
89
|
+
timerManager->callReactNativeMicrotasks(jsiRuntime);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
} catch (jsi::JSError& originalError) {
|
|
93
|
+
jsErrorHandler->handleError(jsiRuntime, originalError, true);
|
|
94
|
+
} catch (std::exception& ex) {
|
|
95
|
+
jsi::JSError error(
|
|
96
|
+
jsiRuntime, std::string("Non-js exception: ") + ex.what());
|
|
97
|
+
jsErrorHandler->handleError(jsiRuntime, error, true);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
112
100
|
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
};
|
|
101
|
+
};
|
|
116
102
|
|
|
117
103
|
if (parentInspectorTarget_) {
|
|
118
104
|
auto executor = parentInspectorTarget_->executorFromThis();
|
|
@@ -248,7 +234,7 @@ void ReactInstance::loadScript(
|
|
|
248
234
|
std::weak_ptr<BufferedRuntimeExecutor>(
|
|
249
235
|
bufferedRuntimeExecutor_),
|
|
250
236
|
completion](jsi::Runtime& runtime) {
|
|
251
|
-
|
|
237
|
+
TraceSection s("ReactInstance::loadScript");
|
|
252
238
|
bool hasLogger(ReactMarker::logTaggedMarkerBridgelessImpl);
|
|
253
239
|
if (hasLogger) {
|
|
254
240
|
ReactMarker::logTaggedMarkerBridgeless(
|
|
@@ -301,7 +287,7 @@ void ReactInstance::callFunctionOnModule(
|
|
|
301
287
|
methodName = methodName,
|
|
302
288
|
args = std::move(args)](
|
|
303
289
|
jsi::Runtime& runtime) {
|
|
304
|
-
|
|
290
|
+
TraceSection s(
|
|
305
291
|
"ReactInstance::callFunctionOnModule",
|
|
306
292
|
"moduleName",
|
|
307
293
|
moduleName,
|
|
@@ -350,7 +336,7 @@ void ReactInstance::registerSegment(
|
|
|
350
336
|
LOG(WARNING) << "Starting to run ReactInstance::registerSegment with segment "
|
|
351
337
|
<< segmentId;
|
|
352
338
|
runtimeScheduler_->scheduleWork([=](jsi::Runtime& runtime) {
|
|
353
|
-
|
|
339
|
+
TraceSection s("ReactInstance::registerSegment");
|
|
354
340
|
const auto tag = folly::to<std::string>(segmentId);
|
|
355
341
|
auto script = JSBigFileString::fromPath(segmentPath);
|
|
356
342
|
if (script->size() == 0) {
|
|
@@ -407,7 +393,7 @@ void ReactInstance::initializeRuntime(
|
|
|
407
393
|
BindingsInstallFunc bindingsInstallFunc) noexcept {
|
|
408
394
|
runtimeScheduler_->scheduleWork([this, options, bindingsInstallFunc](
|
|
409
395
|
jsi::Runtime& runtime) {
|
|
410
|
-
|
|
396
|
+
TraceSection s("ReactInstance::initializeRuntime");
|
|
411
397
|
|
|
412
398
|
bindNativePerformanceNow(runtime);
|
|
413
399
|
|
|
@@ -667,7 +653,7 @@ void ReactInstance::handleMemoryPressureJs(int pressureLevel) {
|
|
|
667
653
|
LOG(INFO) << "Memory warning (pressure level: " << levelName
|
|
668
654
|
<< ") received by JS VM, running a GC";
|
|
669
655
|
runtimeScheduler_->scheduleWork([=](jsi::Runtime& runtime) {
|
|
670
|
-
|
|
656
|
+
TraceSection s("ReactInstance::handleMemoryPressure");
|
|
671
657
|
runtime.instrumentation().collectGarbage(levelName);
|
|
672
658
|
});
|
|
673
659
|
break;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
#include <JSI/decorator.h>
|
|
10
10
|
#include <NodeApiJsiRuntime.h>
|
|
11
11
|
#include <crash/verifyElseCrash.h>
|
|
12
|
-
#include <cxxreact/
|
|
12
|
+
#include <cxxreact/TraceSection.h>
|
|
13
13
|
#include <jsinspector-modern/ConsoleMessage.h>
|
|
14
14
|
#include <jsinspector-modern/InspectorInterfaces.h>
|
|
15
15
|
#include <mutex>
|
|
@@ -311,7 +311,7 @@ HermesRuntimeHolder::~HermesRuntimeHolder() {
|
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
void HermesRuntimeHolder::initRuntime() noexcept {
|
|
314
|
-
facebook::react::
|
|
314
|
+
facebook::react::TraceSection s("HermesExecutorFactory::makeHermesRuntimeSystraced");
|
|
315
315
|
std::shared_ptr<facebook::react::DevSettings> devSettings = m_weakDevSettings.lock();
|
|
316
316
|
VerifyElseCrash(devSettings);
|
|
317
317
|
|
package/Shared/Shared.vcxitems
CHANGED
|
@@ -111,10 +111,10 @@
|
|
|
111
111
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\Modal\WindowsModalHostViewComponentView.cpp">
|
|
112
112
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
113
113
|
</ClCompile>
|
|
114
|
-
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\
|
|
114
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ParagraphComponentView.cpp">
|
|
115
115
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
116
116
|
</ClCompile>
|
|
117
|
-
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\
|
|
117
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\PortalComponentView.cpp">
|
|
118
118
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
119
119
|
</ClCompile>
|
|
120
120
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\RootComponentView.cpp">
|
|
@@ -141,9 +141,6 @@
|
|
|
141
141
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TextInput\WindowsTextInputShadowNode.cpp">
|
|
142
142
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
143
143
|
</ClCompile>
|
|
144
|
-
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TextInput\WindowsTextInputState.cpp">
|
|
145
|
-
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
146
|
-
</ClCompile>
|
|
147
144
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\Theme.cpp">
|
|
148
145
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
149
146
|
<DependentUpon>$(ReactNativeWindowsDir)Microsoft.ReactNative\Theme.idl</DependentUpon>
|
|
@@ -216,9 +213,6 @@
|
|
|
216
213
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\textlayoutmanager\TextLayoutManager.cpp">
|
|
217
214
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
218
215
|
</ClCompile>
|
|
219
|
-
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\ReactNativeConfigProperties.cpp">
|
|
220
|
-
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
221
|
-
</ClCompile>
|
|
222
216
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\WindowsImageManager.cpp">
|
|
223
217
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
224
218
|
</ClCompile>
|
|
@@ -317,6 +311,7 @@
|
|
|
317
311
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\Modal\WindowsModalHostViewComponentView.h" />
|
|
318
312
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\Modal\WindowsModalHostViewSate.h" />
|
|
319
313
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ParagraphComponentView.h" />
|
|
314
|
+
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\PortalComponentView.h" />
|
|
320
315
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\RootComponentView.h" />
|
|
321
316
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ScrollViewComponentView.h" />
|
|
322
317
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\SwitchComponentView.h" />
|
|
@@ -324,7 +319,6 @@
|
|
|
324
319
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TextInput\WindowsTextInputEventEmitter.h" />
|
|
325
320
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TextInput\WindowsTextInputProps.h" />
|
|
326
321
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TextInput\WindowsTextInputShadowNode.h" />
|
|
327
|
-
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TextInput\WindowsTextInputState.h" />
|
|
328
322
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\UiaHelpers.h" />
|
|
329
323
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\AbiViewProps.h" />
|
|
330
324
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\AbiViewComponentDescriptor.h" />
|
|
@@ -335,7 +329,6 @@
|
|
|
335
329
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\components\view\HostPlatformViewEventEmitter.h" />
|
|
336
330
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\core\graphicsConversions.h" />
|
|
337
331
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\textlayoutmanager\TextLayoutManager.h" />
|
|
338
|
-
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\ReactNativeConfigProperties.h" />
|
|
339
332
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\WindowsImageManager.h" />
|
|
340
333
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\JsiApi.h">
|
|
341
334
|
<DependentUpon>$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\JsiApi.idl</DependentUpon>
|
|
@@ -547,14 +540,14 @@
|
|
|
547
540
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\ConsoleMessage.cpp" />
|
|
548
541
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\NetworkIOAgent.cpp" />
|
|
549
542
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\TracingAgent.cpp" />
|
|
543
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\tracing\PerformanceTracer.cpp" />
|
|
550
544
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\utils\jsi-utils.cpp" />
|
|
551
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\reactperflogger\
|
|
545
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\reactperflogger\ReactPerfettoLogger.cpp" />
|
|
552
546
|
</ItemGroup>
|
|
553
547
|
<ItemGroup>
|
|
554
548
|
<None Include="$(MSBuildThisFileDirectory)tracing\rnw.wprp" />
|
|
555
549
|
</ItemGroup>
|
|
556
550
|
<ItemGroup Condition="'$(UseFabric)' == 'true'">
|
|
557
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\config\ReactNativeConfig.cpp" />
|
|
558
551
|
<CLCompile Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\defaults\DefaultTurboModules.cpp" />
|
|
559
552
|
<!-- Uncomment this when we move to a newer JSI -->
|
|
560
553
|
<!-- <CLCompile Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\microtasks\NativeMicrotasks.cpp" /> -->
|
|
@@ -593,6 +586,8 @@
|
|
|
593
586
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\RawTextProps.cpp" />
|
|
594
587
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\TextShadowNode.cpp" />
|
|
595
588
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\RawTextShadowNode.cpp" />
|
|
589
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\text\ParagraphComponentDescriptor.cpp" />
|
|
590
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\textinput\TextInputState.cpp" />
|
|
596
591
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\view\AccessibilityProps.cpp" />
|
|
597
592
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\view\PointerEvent.cpp" />
|
|
598
593
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\components\view\BaseTouch.cpp" />
|
|
@@ -651,14 +646,13 @@
|
|
|
651
646
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\telemetry\SurfaceTelemetry.cpp" />
|
|
652
647
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\telemetry\TransactionTelemetry.cpp" />
|
|
653
648
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\textlayoutmanager\TextMeasureCache.cpp" />
|
|
654
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\bindingUtils.cpp" />
|
|
655
649
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\PointerEventsProcessor.cpp" />
|
|
656
650
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\PointerHoverTracker.cpp" />
|
|
657
651
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\consistency\LatestShadowTreeRevisionProvider.cpp" />
|
|
658
652
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\consistency\LazyShadowTreeRevisionConsistencyManager.cpp" />
|
|
659
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\SurfaceRegistryBinding.cpp" DisableSpecificWarnings="4715;%(DisableSpecificWarnings)" />
|
|
660
653
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\UIManager.cpp" />
|
|
661
654
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\UIManagerBinding.cpp" DisableSpecificWarnings="4389;4715;%(DisableSpecificWarnings)" />
|
|
655
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\AppRegistryBinding.cpp" />
|
|
662
656
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\runtime\BufferedRuntimeExecutor.cpp" />
|
|
663
657
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\runtime\JSRuntimeFactory.cpp" />
|
|
664
658
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\runtime\ReactInstance.cpp" />
|
|
@@ -152,9 +152,6 @@
|
|
|
152
152
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\ImageRequest.cpp">
|
|
153
153
|
<Filter>Source Files\Fabric</Filter>
|
|
154
154
|
</ClCompile>
|
|
155
|
-
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\ReactNativeConfigProperties.cpp">
|
|
156
|
-
<Filter>Source Files\Fabric</Filter>
|
|
157
|
-
</ClCompile>
|
|
158
155
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\WindowsImageManager.cpp">
|
|
159
156
|
<Filter>Source Files\Fabric</Filter>
|
|
160
157
|
</ClCompile>
|
|
@@ -179,9 +176,6 @@
|
|
|
179
176
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\Modal\WindowsModalHostViewComponentView.cpp">
|
|
180
177
|
<Filter>Source Files\Fabric\Composition</Filter>
|
|
181
178
|
</ClCompile>
|
|
182
|
-
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\Modal\WindowsModalHostViewShadowNode.cpp">
|
|
183
|
-
<Filter>Source Files\Fabric\Composition</Filter>
|
|
184
|
-
</ClCompile>
|
|
185
179
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ParagraphComponentView.cpp">
|
|
186
180
|
<Filter>Source Files\Fabric\Composition</Filter>
|
|
187
181
|
</ClCompile>
|
|
@@ -203,9 +197,6 @@
|
|
|
203
197
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TextInput\WindowsTextInputShadowNode.cpp">
|
|
204
198
|
<Filter>Source Files\Fabric\Composition\TextInput</Filter>
|
|
205
199
|
</ClCompile>
|
|
206
|
-
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TextInput\WindowsTextInputState.cpp">
|
|
207
|
-
<Filter>Source Files\Fabric\Composition\TextInput</Filter>
|
|
208
|
-
</ClCompile>
|
|
209
200
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionContextHelper.cpp">
|
|
210
201
|
<Filter>Source Files\Fabric\Composition</Filter>
|
|
211
202
|
</ClCompile>
|
|
@@ -239,6 +230,7 @@
|
|
|
239
230
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\textlayoutmanager\TextLayoutManager.cpp">
|
|
240
231
|
<Filter>Source Files\Fabric\platform\react\renderer\textlayoutmanager</Filter>
|
|
241
232
|
</ClCompile>
|
|
233
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\PortalComponentView.cpp" />
|
|
242
234
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\RootComponentView.cpp" />
|
|
243
235
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\UnimplementedNativeViewComponentView.cpp" />
|
|
244
236
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\AbiViewComponentDescriptor.cpp" />
|
|
@@ -330,13 +322,14 @@
|
|
|
330
322
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\graphics\ColorComponents.cpp" />
|
|
331
323
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\cxxreact\JSExecutor.cpp" />
|
|
332
324
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\RuntimeTargetConsole.cpp" />
|
|
333
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\reactperflogger\
|
|
325
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\reactperflogger\ReactPerfettoLogger.cpp" />
|
|
334
326
|
<ClCompile Include="$(MSBuildThisFileDirectory)Networking\NetworkPropertyIds.cpp" />
|
|
335
327
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\AbiEventEmitter.cpp" />
|
|
336
328
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TooltipService.cpp" />
|
|
337
329
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\BorderPrimitive.cpp" />
|
|
338
330
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\TracingAgent.cpp" />
|
|
339
331
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\codegen\rnwcoreJSI-generated.cpp" />
|
|
332
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\tracing\PerformanceTracer.cpp" />
|
|
340
333
|
</ItemGroup>
|
|
341
334
|
<ItemGroup>
|
|
342
335
|
<Filter Include="Source Files">
|
|
@@ -711,9 +704,6 @@
|
|
|
711
704
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\FabricUIManagerModule.h">
|
|
712
705
|
<Filter>Header Files\Fabric</Filter>
|
|
713
706
|
</ClInclude>
|
|
714
|
-
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\ReactNativeConfigProperties.h">
|
|
715
|
-
<Filter>Header Files\Fabric</Filter>
|
|
716
|
-
</ClInclude>
|
|
717
707
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\WindowsImageManager.h">
|
|
718
708
|
<Filter>Header Files\Fabric</Filter>
|
|
719
709
|
</ClInclude>
|
|
@@ -759,9 +749,6 @@
|
|
|
759
749
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TextInput\WindowsTextInputShadowNode.h">
|
|
760
750
|
<Filter>Header Files\Fabric\Composition\TextInput</Filter>
|
|
761
751
|
</ClInclude>
|
|
762
|
-
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TextInput\WindowsTextInputState.h">
|
|
763
|
-
<Filter>Header Files\Fabric\Composition\TextInput</Filter>
|
|
764
|
-
</ClInclude>
|
|
765
752
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionContextHelper.h">
|
|
766
753
|
<Filter>Header Files\Fabric\Composition</Filter>
|
|
767
754
|
</ClInclude>
|
|
@@ -786,6 +773,7 @@
|
|
|
786
773
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\textlayoutmanager\TextLayoutManager.h">
|
|
787
774
|
<Filter>Header Files\Fabric\platform\react\renderer\textlayoutmanager</Filter>
|
|
788
775
|
</ClInclude>
|
|
776
|
+
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\PortalComponentView.h" />
|
|
789
777
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\RootComponentView.h" />
|
|
790
778
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\AbiViewProps.h" />
|
|
791
779
|
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\AbiViewComponentDescriptor.h" />
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#include "pch.h"
|
|
5
5
|
#include "Threading/BatchingQueueThread.h"
|
|
6
6
|
#include <cxxreact/Instance.h>
|
|
7
|
-
#include <cxxreact/
|
|
7
|
+
#include <cxxreact/TraceSection.h>
|
|
8
8
|
#include <eventWaitHandle/eventWaitHandle.h>
|
|
9
9
|
#include <cassert>
|
|
10
10
|
|
|
@@ -41,9 +41,9 @@ void BatchingQueueCallInvoker::EnsureQueue() noexcept {
|
|
|
41
41
|
void BatchingQueueCallInvoker::PostBatch() noexcept {
|
|
42
42
|
if (m_taskQueue) {
|
|
43
43
|
m_queueThread->runOnQueue([taskQueue{std::move(m_taskQueue)}]() noexcept {
|
|
44
|
-
|
|
44
|
+
TraceSection s1("BatchingQueueCallInvoker::PostBatch");
|
|
45
45
|
for (auto &task : *taskQueue) {
|
|
46
|
-
|
|
46
|
+
TraceSection s2("BatchingQueueCallInvoker::PostBatch::Task");
|
|
47
47
|
task();
|
|
48
48
|
task = nullptr;
|
|
49
49
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* This file is auto-generated from a NativeModule spec file in js.
|
|
4
|
+
*
|
|
5
|
+
* This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules
|
|
6
|
+
* in a way that also verifies at compile time that the native module matches the interface required
|
|
7
|
+
* by the TurboModule JS spec.
|
|
8
|
+
*/
|
|
9
|
+
#pragma once
|
|
10
|
+
// clang-format off
|
|
11
|
+
|
|
12
|
+
#include <NativeModules.h>
|
|
13
|
+
#include <tuple>
|
|
14
|
+
|
|
15
|
+
namespace Microsoft::ReactNativeSpecs {
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
struct CPUTimeSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
|
|
19
|
+
static constexpr auto methods = std::tuple{
|
|
20
|
+
SyncMethod<double() noexcept>{0, L"getCPUTimeNanos"},
|
|
21
|
+
SyncMethod<bool() noexcept>{1, L"hasAccurateCPUTimeNanosForBenchmarks"},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
template <class TModule>
|
|
25
|
+
static constexpr void ValidateModule() noexcept {
|
|
26
|
+
constexpr auto methodCheckResults = CheckMethods<TModule, CPUTimeSpec>();
|
|
27
|
+
|
|
28
|
+
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
29
|
+
0,
|
|
30
|
+
"getCPUTimeNanos",
|
|
31
|
+
" REACT_SYNC_METHOD(getCPUTimeNanos) double getCPUTimeNanos() noexcept { /* implementation */ }\n"
|
|
32
|
+
" REACT_SYNC_METHOD(getCPUTimeNanos) static double getCPUTimeNanos() noexcept { /* implementation */ }\n");
|
|
33
|
+
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
34
|
+
1,
|
|
35
|
+
"hasAccurateCPUTimeNanosForBenchmarks",
|
|
36
|
+
" REACT_SYNC_METHOD(hasAccurateCPUTimeNanosForBenchmarks) bool hasAccurateCPUTimeNanosForBenchmarks() noexcept { /* implementation */ }\n"
|
|
37
|
+
" REACT_SYNC_METHOD(hasAccurateCPUTimeNanosForBenchmarks) static bool hasAccurateCPUTimeNanosForBenchmarks() noexcept { /* implementation */ }\n");
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
} // namespace Microsoft::ReactNativeSpecs
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* This file is auto-generated from a NativeModule spec file in js.
|
|
4
|
+
*
|
|
5
|
+
* This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules
|
|
6
|
+
* in a way that also verifies at compile time that the native module matches the interface required
|
|
7
|
+
* by the TurboModule JS spec.
|
|
8
|
+
*/
|
|
9
|
+
#pragma once
|
|
10
|
+
// clang-format off
|
|
11
|
+
|
|
12
|
+
#include <NativeModules.h>
|
|
13
|
+
#include <tuple>
|
|
14
|
+
|
|
15
|
+
namespace Microsoft::ReactNativeSpecs {
|
|
16
|
+
|
|
17
|
+
struct FantomSpec_RenderFormatOptions {
|
|
18
|
+
bool includeRoot;
|
|
19
|
+
bool includeLayoutMetrics;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(FantomSpec_RenderFormatOptions*) noexcept {
|
|
24
|
+
winrt::Microsoft::ReactNative::FieldMap fieldMap {
|
|
25
|
+
{L"includeRoot", &FantomSpec_RenderFormatOptions::includeRoot},
|
|
26
|
+
{L"includeLayoutMetrics", &FantomSpec_RenderFormatOptions::includeLayoutMetrics},
|
|
27
|
+
};
|
|
28
|
+
return fieldMap;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
struct FantomSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
|
|
32
|
+
static constexpr auto methods = std::tuple{
|
|
33
|
+
Method<void(double, double, double, double) noexcept>{0, L"startSurface"},
|
|
34
|
+
Method<void(double) noexcept>{1, L"stopSurface"},
|
|
35
|
+
SyncMethod<std::vector<std::string>(double) noexcept>{2, L"getMountingManagerLogs"},
|
|
36
|
+
Method<void() noexcept>{3, L"flushMessageQueue"},
|
|
37
|
+
SyncMethod<std::string(double, FantomSpec_RenderFormatOptions) noexcept>{4, L"getRenderedOutput"},
|
|
38
|
+
Method<void(std::string) noexcept>{5, L"reportTestSuiteResultsJSON"},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
template <class TModule>
|
|
42
|
+
static constexpr void ValidateModule() noexcept {
|
|
43
|
+
constexpr auto methodCheckResults = CheckMethods<TModule, FantomSpec>();
|
|
44
|
+
|
|
45
|
+
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
46
|
+
0,
|
|
47
|
+
"startSurface",
|
|
48
|
+
" REACT_METHOD(startSurface) void startSurface(double surfaceId, double viewportWidth, double viewportHeight, double devicePixelRatio) noexcept { /* implementation */ }\n"
|
|
49
|
+
" REACT_METHOD(startSurface) static void startSurface(double surfaceId, double viewportWidth, double viewportHeight, double devicePixelRatio) noexcept { /* implementation */ }\n");
|
|
50
|
+
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
51
|
+
1,
|
|
52
|
+
"stopSurface",
|
|
53
|
+
" REACT_METHOD(stopSurface) void stopSurface(double surfaceId) noexcept { /* implementation */ }\n"
|
|
54
|
+
" REACT_METHOD(stopSurface) static void stopSurface(double surfaceId) noexcept { /* implementation */ }\n");
|
|
55
|
+
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
56
|
+
2,
|
|
57
|
+
"getMountingManagerLogs",
|
|
58
|
+
" REACT_SYNC_METHOD(getMountingManagerLogs) std::vector<std::string> getMountingManagerLogs(double surfaceId) noexcept { /* implementation */ }\n"
|
|
59
|
+
" REACT_SYNC_METHOD(getMountingManagerLogs) static std::vector<std::string> getMountingManagerLogs(double surfaceId) noexcept { /* implementation */ }\n");
|
|
60
|
+
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
61
|
+
3,
|
|
62
|
+
"flushMessageQueue",
|
|
63
|
+
" REACT_METHOD(flushMessageQueue) void flushMessageQueue() noexcept { /* implementation */ }\n"
|
|
64
|
+
" REACT_METHOD(flushMessageQueue) static void flushMessageQueue() noexcept { /* implementation */ }\n");
|
|
65
|
+
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
66
|
+
4,
|
|
67
|
+
"getRenderedOutput",
|
|
68
|
+
" REACT_SYNC_METHOD(getRenderedOutput) std::string getRenderedOutput(double surfaceId, FantomSpec_RenderFormatOptions && config) noexcept { /* implementation */ }\n"
|
|
69
|
+
" REACT_SYNC_METHOD(getRenderedOutput) static std::string getRenderedOutput(double surfaceId, FantomSpec_RenderFormatOptions && config) noexcept { /* implementation */ }\n");
|
|
70
|
+
REACT_SHOW_METHOD_SPEC_ERRORS(
|
|
71
|
+
5,
|
|
72
|
+
"reportTestSuiteResultsJSON",
|
|
73
|
+
" REACT_METHOD(reportTestSuiteResultsJSON) void reportTestSuiteResultsJSON(std::string results) noexcept { /* implementation */ }\n"
|
|
74
|
+
" REACT_METHOD(reportTestSuiteResultsJSON) static void reportTestSuiteResultsJSON(std::string results) noexcept { /* implementation */ }\n");
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
} // namespace Microsoft::ReactNativeSpecs
|