diff --git a/change/react-native-windows-2c423284-4814-4644-8f7e-b88ab9acf84e.json b/change/react-native-windows-2c423284-4814-4644-8f7e-b88ab9acf84e.json
new file mode 100644
index 00000000000..ae486d0eef9
--- /dev/null
+++ b/change/react-native-windows-2c423284-4814-4644-8f7e-b88ab9acf84e.json
@@ -0,0 +1,7 @@
+{
+ "type": "patch",
+ "comment": "Add support for modern inspector",
+ "packageName": "react-native-windows",
+ "email": "vmorozov@microsoft.com",
+ "dependentChangeType": "patch"
+}
diff --git a/docs/modern-inspector-details.md b/docs/modern-inspector-details.md
new file mode 100644
index 00000000000..bf55e0611d8
--- /dev/null
+++ b/docs/modern-inspector-details.md
@@ -0,0 +1,70 @@
+# Modern Inspector Support in React Native for Windows
+
+## Overview
+The modern inspector is the Chrome DevTools–based debugging experience that ships with the latest
+versions of React Native. This experience now works end-to-end for React Native for Windows (RNW)
+applications, enabling parity with Android and iOS. The integration provides a unified way to inspect
+JavaScript execution, evaluate console expressions, profile CPU and memory usage, and visualize the
+component hierarchy for both the Paper and Composition UI stacks.
+
+## Modern Inspector Building Blocks
+- **Host Target** – One per `ReactHost`; surfaces metadata, reload requests, pause overlays, and
+ implements the CDP-facing delegate (`ReactInspectorHostTargetDelegate`).
+- **Instance Target** – Created for each React instance; registers runtime targets, tracks instance
+ lifecycle, and unregisters cleanly on reload.
+- **Runtime Target & Agent** – Runtime targets map to JavaScript VMs; agents are per-session objects
+ that translate Chrome DevTools Protocol (CDP) messages into engine calls. RNW mirrors upstream
+ lifetimes so reloads tear everything down deterministically.
+- **Frontend Channel** – Delivers JSON CDP payloads between the RNW host and DevTools.
+- **Inspector Thread** – A single `ReactInspectorThread` ensures CDP work is serialized away from
+ the UI and JS queues. (iOS and Andrtoid use UI thread.)
+- **Debugger Notifications** – `DebuggerNotifications.h` broadcasts pause/resume events so view
+ hosts can react (e.g., showing overlays or resuming when the debugger continues).
+
+## Windows Integration Points
+- **ReactHost & ReactOptions** – `ReactHost` creates the `HostTarget`, exposes it through
+ `ReactOptions::InspectorHostTarget`, and implements reload/pause hooks. This is the jump-off point
+ for all inspector traffic. The inspector supported only if the `UseDirectDebugger` is true.
+- **ReactInstanceWin / OInstance** – Register and unregister instance/runtime targets around runtime
+ creation, keeping the inspector aligned with bridgeless and legacy bridge lifecycles.
+- **DevSupportManager & Packager** – `DevSupportManager` now spins up
+ `ReactInspectorPackagerConnectionDelegate`, allowing Metro to broker modern inspector connections
+ and reuse the existing websocket infrastructure.
+- **Dev Console Shortcut** – Metro’s `J` shortcut launches the inspector for Windows apps, matching
+ upstream behavior.
+
+## UI Overlays
+- **Composition** – `DebuggerUIIsland` renders pause overlays, focus chrome, and selection adorners
+ whenever the runtime is paused.
+- **Paper** – `ReactRootView` updates provide the same pause/selection affordances.
+
+## Hermes Runtime Integration
+- `HermesRuntimeTargetDelegate` and `HermesRuntimeAgentDelegate` wrap the hermes-windows C debug API
+ so we can re-use upstream modern inspector code.
+- `RuntimeHolder`/`HermesRuntimeHolder` surface a `createRuntimeTargetDelegate` hook that instantiates
+ delegates only when the inspector is enabled, and safely tears them down during reloads.
+
+## Packager & Console Integration
+- `ReactInspectorPackagerConnectionDelegate` maps the Metro websocket APIs to the modern inspector
+ handshake.
+- Console output, CPU sampling, and memory profiling are forwarded through the Hermes inspector
+ plumbing automatically once a session is active.
+
+## Using the Modern Inspector with RNW
+1. Start your Metro bundler (`npx react-native start` or `yarn start`).
+2. Launch your RNW app (Paper or Composition).
+3. In the Metro console, press `J` to open the modern inspector URL in a browser.
+4. Chrome DevTools will connect to the Hermes runtime. Pause execution, explore the component tree,
+ and capture profiles as needed.
+5. When execution is paused, the corresponding overlay is rendered in the app window; resume to clear
+ the overlay.
+
+## Known Limitations & Follow-Up Work
+- **Network profiling** – The `NetworkIOAgent` is not wired up yet for Windows. The integration point
+ is the `ReactInspectorHostTargetDelegate` in
+ `vnext/Microsoft.ReactNative/ReactHost/ReactHost.cpp`; override `loadNetworkResource` there to
+ forward requests through a Windows HTTP helper (similar to `GetJavaScriptFromServerAsync`) and
+ stream results back via the provided `NetworkRequestListener`. Until this happens, the Network tab
+ in DevTools stays empty.
+- **Legacy Chakra runtime** – Modern inspector support currently targets Hermes. Chakra-based apps
+ continue to rely on legacy debugging flows.
diff --git a/packages/@react-native-windows/automation-channel/windows/AutomationChannel/packages.chakra.lock.json b/packages/@react-native-windows/automation-channel/windows/AutomationChannel/packages.chakra.lock.json
index 091352742c4..006baa72de2 100644
--- a/packages/@react-native-windows/automation-channel/windows/AutomationChannel/packages.chakra.lock.json
+++ b/packages/@react-native-windows/automation-channel/windows/AutomationChannel/packages.chakra.lock.json
@@ -29,8 +29,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -72,7 +72,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/@react-native-windows/automation-channel/windows/AutomationChannel/packages.lock.json b/packages/@react-native-windows/automation-channel/windows/AutomationChannel/packages.lock.json
index 091352742c4..006baa72de2 100644
--- a/packages/@react-native-windows/automation-channel/windows/AutomationChannel/packages.lock.json
+++ b/packages/@react-native-windows/automation-channel/windows/AutomationChannel/packages.lock.json
@@ -29,8 +29,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -72,7 +72,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/@react-native-windows/automation-channel/windows/AutomationChannel/packages.newarch.lock.json b/packages/@react-native-windows/automation-channel/windows/AutomationChannel/packages.newarch.lock.json
index 88a18eb0b26..4e71702ddc6 100644
--- a/packages/@react-native-windows/automation-channel/windows/AutomationChannel/packages.newarch.lock.json
+++ b/packages/@react-native-windows/automation-channel/windows/AutomationChannel/packages.newarch.lock.json
@@ -37,8 +37,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -85,7 +85,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/e2e-test-app-fabric/windows/RNTesterApp-Fabric.Package/packages.lock.json b/packages/e2e-test-app-fabric/windows/RNTesterApp-Fabric.Package/packages.lock.json
index e75dd28fcc9..9ba83dc5121 100644
--- a/packages/e2e-test-app-fabric/windows/RNTesterApp-Fabric.Package/packages.lock.json
+++ b/packages/e2e-test-app-fabric/windows/RNTesterApp-Fabric.Package/packages.lock.json
@@ -14,8 +14,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -85,7 +85,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
"ReactCommon": "[1.0.0, )",
@@ -103,7 +103,7 @@
"type": "Project",
"dependencies": {
"AutomationChannel": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.ReactNative": "[1.0.0, )",
"Microsoft.VCRTForwarders.140": "[1.0.2-rc, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
diff --git a/packages/e2e-test-app-fabric/windows/RNTesterApp-Fabric/packages.lock.json b/packages/e2e-test-app-fabric/windows/RNTesterApp-Fabric/packages.lock.json
index 72ce10d311b..43da89c8432 100644
--- a/packages/e2e-test-app-fabric/windows/RNTesterApp-Fabric/packages.lock.json
+++ b/packages/e2e-test-app-fabric/windows/RNTesterApp-Fabric/packages.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.VCRTForwarders.140": {
"type": "Direct",
@@ -95,7 +95,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/e2e-test-app/windows/RNTesterApp/packages.chakra.lock.json b/packages/e2e-test-app/windows/RNTesterApp/packages.chakra.lock.json
index 1298ee91e66..8f5b69d29b1 100644
--- a/packages/e2e-test-app/windows/RNTesterApp/packages.chakra.lock.json
+++ b/packages/e2e-test-app/windows/RNTesterApp/packages.chakra.lock.json
@@ -46,8 +46,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.Net.Native.Compiler": {
"type": "Transitive",
@@ -197,7 +197,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/e2e-test-app/windows/RNTesterApp/packages.lock.json b/packages/e2e-test-app/windows/RNTesterApp/packages.lock.json
index 4dac7070481..9526d7f5461 100644
--- a/packages/e2e-test-app/windows/RNTesterApp/packages.lock.json
+++ b/packages/e2e-test-app/windows/RNTesterApp/packages.lock.json
@@ -4,9 +4,9 @@
"UAP,Version=v10.0.17763": {
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.NETCore.UniversalWindowsPlatform": {
"type": "Direct",
@@ -198,7 +198,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/integration-test-app/windows/InteropTestModuleCS/packages.chakra.lock.json b/packages/integration-test-app/windows/InteropTestModuleCS/packages.chakra.lock.json
index 98062fb9eed..1d3d9a8eb72 100644
--- a/packages/integration-test-app/windows/InteropTestModuleCS/packages.chakra.lock.json
+++ b/packages/integration-test-app/windows/InteropTestModuleCS/packages.chakra.lock.json
@@ -26,8 +26,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.Net.Native.Compiler": {
"type": "Transitive",
@@ -178,7 +178,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/integration-test-app/windows/InteropTestModuleCS/packages.lock.json b/packages/integration-test-app/windows/InteropTestModuleCS/packages.lock.json
index 98062fb9eed..1d3d9a8eb72 100644
--- a/packages/integration-test-app/windows/InteropTestModuleCS/packages.lock.json
+++ b/packages/integration-test-app/windows/InteropTestModuleCS/packages.lock.json
@@ -26,8 +26,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.Net.Native.Compiler": {
"type": "Transitive",
@@ -178,7 +178,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/integration-test-app/windows/integrationtest/packages.chakra.lock.json b/packages/integration-test-app/windows/integrationtest/packages.chakra.lock.json
index 828eabed2c8..24399a4161c 100644
--- a/packages/integration-test-app/windows/integrationtest/packages.chakra.lock.json
+++ b/packages/integration-test-app/windows/integrationtest/packages.chakra.lock.json
@@ -29,8 +29,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.Net.Native.Compiler": {
"type": "Transitive",
@@ -199,7 +199,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/integration-test-app/windows/integrationtest/packages.lock.json b/packages/integration-test-app/windows/integrationtest/packages.lock.json
index c885f8e587a..58b00ed3a30 100644
--- a/packages/integration-test-app/windows/integrationtest/packages.lock.json
+++ b/packages/integration-test-app/windows/integrationtest/packages.lock.json
@@ -4,9 +4,9 @@
"native,Version=v0.0": {
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.UI.Xaml": {
"type": "Direct",
@@ -200,7 +200,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/playground/windows/PlaygroundNativeModules/packages.lock.json b/packages/playground/windows/PlaygroundNativeModules/packages.lock.json
index 091352742c4..006baa72de2 100644
--- a/packages/playground/windows/PlaygroundNativeModules/packages.lock.json
+++ b/packages/playground/windows/PlaygroundNativeModules/packages.lock.json
@@ -29,8 +29,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -72,7 +72,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/playground/windows/playground-composition.Package/packages.experimentalwinui3.lock.json b/packages/playground/windows/playground-composition.Package/packages.experimentalwinui3.lock.json
index 54a47aafc49..8472064b28f 100644
--- a/packages/playground/windows/playground-composition.Package/packages.experimentalwinui3.lock.json
+++ b/packages/playground/windows/playground-composition.Package/packages.experimentalwinui3.lock.json
@@ -14,8 +14,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -76,7 +76,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250127003-experimental3, )",
"ReactCommon": "[1.0.0, )",
@@ -86,7 +86,7 @@
"playground-composition": {
"type": "Project",
"dependencies": {
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.ReactNative": "[1.0.0, )",
"Microsoft.VCRTForwarders.140": "[1.0.2-rc, )",
"Microsoft.WindowsAppSDK": "[1.7.250127003-experimental3, )",
diff --git a/packages/playground/windows/playground-composition.Package/packages.lock.json b/packages/playground/windows/playground-composition.Package/packages.lock.json
index a23f348d7fa..ea87593a461 100644
--- a/packages/playground/windows/playground-composition.Package/packages.lock.json
+++ b/packages/playground/windows/playground-composition.Package/packages.lock.json
@@ -14,8 +14,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -76,7 +76,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
"ReactCommon": "[1.0.0, )",
@@ -86,7 +86,7 @@
"playground-composition": {
"type": "Project",
"dependencies": {
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.ReactNative": "[1.0.0, )",
"Microsoft.VCRTForwarders.140": "[1.0.2-rc, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
diff --git a/packages/playground/windows/playground-composition/packages.experimentalwinui3.lock.json b/packages/playground/windows/playground-composition/packages.experimentalwinui3.lock.json
index 143b98b49da..dc0e73813b3 100644
--- a/packages/playground/windows/playground-composition/packages.experimentalwinui3.lock.json
+++ b/packages/playground/windows/playground-composition/packages.experimentalwinui3.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.VCRTForwarders.140": {
"type": "Direct",
@@ -86,7 +86,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250127003-experimental3, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/playground/windows/playground-composition/packages.lock.json b/packages/playground/windows/playground-composition/packages.lock.json
index df9b70406dd..8fb2da00945 100644
--- a/packages/playground/windows/playground-composition/packages.lock.json
+++ b/packages/playground/windows/playground-composition/packages.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.VCRTForwarders.140": {
"type": "Direct",
@@ -86,7 +86,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/playground/windows/playground/packages.lock.json b/packages/playground/windows/playground/packages.lock.json
index 5c69020f59f..9da2e1f071b 100644
--- a/packages/playground/windows/playground/packages.lock.json
+++ b/packages/playground/windows/playground/packages.lock.json
@@ -4,9 +4,9 @@
"native,Version=v0.0": {
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.UI.Xaml": {
"type": "Direct",
@@ -73,7 +73,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/sample-app-fabric/windows/SampleAppFabric.Package/packages.lock.json b/packages/sample-app-fabric/windows/SampleAppFabric.Package/packages.lock.json
index 7d84a365b4f..d64940b51e4 100644
--- a/packages/sample-app-fabric/windows/SampleAppFabric.Package/packages.lock.json
+++ b/packages/sample-app-fabric/windows/SampleAppFabric.Package/packages.lock.json
@@ -14,8 +14,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -76,7 +76,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
"ReactCommon": "[1.0.0, )",
@@ -93,7 +93,7 @@
"sampleappfabric": {
"type": "Project",
"dependencies": {
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.ReactNative": "[1.0.0, )",
"Microsoft.VCRTForwarders.140": "[1.0.2-rc, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
diff --git a/packages/sample-app-fabric/windows/SampleAppFabric/packages.lock.json b/packages/sample-app-fabric/windows/SampleAppFabric/packages.lock.json
index 48426cb9ce0..83d8e870d2a 100644
--- a/packages/sample-app-fabric/windows/SampleAppFabric/packages.lock.json
+++ b/packages/sample-app-fabric/windows/SampleAppFabric/packages.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.VCRTForwarders.140": {
"type": "Direct",
@@ -86,7 +86,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/sample-apps/windows/SampleAppCPP/packages.lock.json b/packages/sample-apps/windows/SampleAppCPP/packages.lock.json
index b630317fbe8..2d62f83e9ef 100644
--- a/packages/sample-apps/windows/SampleAppCPP/packages.lock.json
+++ b/packages/sample-apps/windows/SampleAppCPP/packages.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.UI.Xaml": {
"type": "Direct",
@@ -186,7 +186,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/sample-apps/windows/SampleAppCS/packages.lock.json b/packages/sample-apps/windows/SampleAppCS/packages.lock.json
index 556fb03525f..7208c87546d 100644
--- a/packages/sample-apps/windows/SampleAppCS/packages.lock.json
+++ b/packages/sample-apps/windows/SampleAppCS/packages.lock.json
@@ -4,9 +4,9 @@
"UAP,Version=v10.0.17763": {
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.NETCore.UniversalWindowsPlatform": {
"type": "Direct",
@@ -180,7 +180,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/sample-apps/windows/SampleLibraryCPP/packages.lock.json b/packages/sample-apps/windows/SampleLibraryCPP/packages.lock.json
index 091352742c4..006baa72de2 100644
--- a/packages/sample-apps/windows/SampleLibraryCPP/packages.lock.json
+++ b/packages/sample-apps/windows/SampleLibraryCPP/packages.lock.json
@@ -29,8 +29,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -72,7 +72,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/sample-apps/windows/SampleLibraryCS/packages.lock.json b/packages/sample-apps/windows/SampleLibraryCS/packages.lock.json
index 98062fb9eed..1d3d9a8eb72 100644
--- a/packages/sample-apps/windows/SampleLibraryCS/packages.lock.json
+++ b/packages/sample-apps/windows/SampleLibraryCS/packages.lock.json
@@ -26,8 +26,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.Net.Native.Compiler": {
"type": "Transitive",
@@ -178,7 +178,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/sample-custom-component/windows/SampleCustomComponent/packages.experimentalwinui3.lock.json b/packages/sample-custom-component/windows/SampleCustomComponent/packages.experimentalwinui3.lock.json
index b868a531010..c765f63ba80 100644
--- a/packages/sample-custom-component/windows/SampleCustomComponent/packages.experimentalwinui3.lock.json
+++ b/packages/sample-custom-component/windows/SampleCustomComponent/packages.experimentalwinui3.lock.json
@@ -37,8 +37,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -85,7 +85,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250127003-experimental3, )",
"ReactCommon": "[1.0.0, )",
diff --git a/packages/sample-custom-component/windows/SampleCustomComponent/packages.lock.json b/packages/sample-custom-component/windows/SampleCustomComponent/packages.lock.json
index 29fbc28aeda..957ffef6cca 100644
--- a/packages/sample-custom-component/windows/SampleCustomComponent/packages.lock.json
+++ b/packages/sample-custom-component/windows/SampleCustomComponent/packages.lock.json
@@ -37,8 +37,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -85,7 +85,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
"ReactCommon": "[1.0.0, )",
diff --git a/vnext/Desktop.ABITests/packages.experimentalwinui3.lock.json b/vnext/Desktop.ABITests/packages.experimentalwinui3.lock.json
index e0c1749a3d9..05edf1a7a58 100644
--- a/vnext/Desktop.ABITests/packages.experimentalwinui3.lock.json
+++ b/vnext/Desktop.ABITests/packages.experimentalwinui3.lock.json
@@ -32,8 +32,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -96,7 +96,7 @@
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
"FollyWin32": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.Web.WebView2": "[1.0.2903.40, )",
"Microsoft.WindowsAppSDK": "[1.7.250127003-experimental3, )",
@@ -108,7 +108,7 @@
"react.windows.desktop.dll": {
"type": "Project",
"dependencies": {
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"React.Windows.Desktop": "[1.0.0, )",
"ReactNative.V8Jsi.Windows": "[0.71.8, )",
diff --git a/vnext/Desktop.ABITests/packages.lock.json b/vnext/Desktop.ABITests/packages.lock.json
index 60d4d8a65eb..fb08ef502b5 100644
--- a/vnext/Desktop.ABITests/packages.lock.json
+++ b/vnext/Desktop.ABITests/packages.lock.json
@@ -32,8 +32,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -96,7 +96,7 @@
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
"FollyWin32": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.Web.WebView2": "[1.0.2903.40, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
@@ -108,7 +108,7 @@
"react.windows.desktop.dll": {
"type": "Project",
"dependencies": {
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"React.Windows.Desktop": "[1.0.0, )",
"ReactNative.V8Jsi.Windows": "[0.71.8, )",
diff --git a/vnext/Desktop.DLL/packages.experimentalwinui3.lock.json b/vnext/Desktop.DLL/packages.experimentalwinui3.lock.json
index 0d149f18d17..9c5d8fc6c14 100644
--- a/vnext/Desktop.DLL/packages.experimentalwinui3.lock.json
+++ b/vnext/Desktop.DLL/packages.experimentalwinui3.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
@@ -87,7 +87,7 @@
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
"FollyWin32": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.Web.WebView2": "[1.0.2903.40, )",
"Microsoft.WindowsAppSDK": "[1.7.250127003-experimental3, )",
diff --git a/vnext/Desktop.DLL/packages.lock.json b/vnext/Desktop.DLL/packages.lock.json
index cf3655879d1..23d5b6288df 100644
--- a/vnext/Desktop.DLL/packages.lock.json
+++ b/vnext/Desktop.DLL/packages.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
@@ -87,7 +87,7 @@
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
"FollyWin32": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.Web.WebView2": "[1.0.2903.40, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
diff --git a/vnext/Desktop.IntegrationTests/packages.experimentalwinui3.lock.json b/vnext/Desktop.IntegrationTests/packages.experimentalwinui3.lock.json
index 28010434691..595e7c3eefc 100644
--- a/vnext/Desktop.IntegrationTests/packages.experimentalwinui3.lock.json
+++ b/vnext/Desktop.IntegrationTests/packages.experimentalwinui3.lock.json
@@ -39,8 +39,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -98,7 +98,7 @@
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
"FollyWin32": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.Web.WebView2": "[1.0.2903.40, )",
"Microsoft.WindowsAppSDK": "[1.7.250127003-experimental3, )",
@@ -110,7 +110,7 @@
"react.windows.desktop.dll": {
"type": "Project",
"dependencies": {
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"React.Windows.Desktop": "[1.0.0, )",
"ReactNative.V8Jsi.Windows": "[0.71.8, )",
diff --git a/vnext/Desktop.IntegrationTests/packages.lock.json b/vnext/Desktop.IntegrationTests/packages.lock.json
index 8da4fb3d4d8..63475edf6d8 100644
--- a/vnext/Desktop.IntegrationTests/packages.lock.json
+++ b/vnext/Desktop.IntegrationTests/packages.lock.json
@@ -39,8 +39,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -98,7 +98,7 @@
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
"FollyWin32": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.Web.WebView2": "[1.0.2903.40, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
@@ -110,7 +110,7 @@
"react.windows.desktop.dll": {
"type": "Project",
"dependencies": {
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"React.Windows.Desktop": "[1.0.0, )",
"ReactNative.V8Jsi.Windows": "[0.71.8, )",
diff --git a/vnext/Desktop.UnitTests/packages.experimentalwinui3.lock.json b/vnext/Desktop.UnitTests/packages.experimentalwinui3.lock.json
index c0f2dc1e163..0adab5b3a4b 100644
--- a/vnext/Desktop.UnitTests/packages.experimentalwinui3.lock.json
+++ b/vnext/Desktop.UnitTests/packages.experimentalwinui3.lock.json
@@ -27,8 +27,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -96,7 +96,7 @@
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
"FollyWin32": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.Web.WebView2": "[1.0.2903.40, )",
"Microsoft.WindowsAppSDK": "[1.7.250127003-experimental3, )",
diff --git a/vnext/Desktop.UnitTests/packages.lock.json b/vnext/Desktop.UnitTests/packages.lock.json
index 62ab93c2809..d25873e3339 100644
--- a/vnext/Desktop.UnitTests/packages.lock.json
+++ b/vnext/Desktop.UnitTests/packages.lock.json
@@ -27,8 +27,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -96,7 +96,7 @@
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
"FollyWin32": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.Web.WebView2": "[1.0.2903.40, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
diff --git a/vnext/Desktop/packages.experimentalwinui3.lock.json b/vnext/Desktop/packages.experimentalwinui3.lock.json
index 489cd101365..53e2a97e58e 100644
--- a/vnext/Desktop/packages.experimentalwinui3.lock.json
+++ b/vnext/Desktop/packages.experimentalwinui3.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
diff --git a/vnext/Desktop/packages.lock.json b/vnext/Desktop/packages.lock.json
index 55d4a1196bd..70e16869c0f 100644
--- a/vnext/Desktop/packages.lock.json
+++ b/vnext/Desktop/packages.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
diff --git a/vnext/Directory.Build.props b/vnext/Directory.Build.props
index 52be548f0b3..2061ed37e58 100644
--- a/vnext/Directory.Build.props
+++ b/vnext/Directory.Build.props
@@ -28,7 +28,7 @@
10.1.0
ca2e3685b160617d3d95fcd9e789c4e06ca88
- 980cb60d7911237d0f647fc566543ef627adac70
+ 21b47f08b762b21b1d4d970940ab23f59f43249c
$(MSBuildThisFileDirectory)stubs
- 980cb60d7911237d0f647fc566543ef627adac70
+ 21b47f08b762b21b1d4d970940ab23f59f43249c
true
$(MSBuildThisFileDirectory)
$(ReactNativeDir)\..\..\node_modules\.node-api-jsi\node-api-jsi-$(NodeApiJsiCommitHash)\
diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/packages.experimentalwinui3.lock.json b/vnext/Microsoft.ReactNative.IntegrationTests/packages.experimentalwinui3.lock.json
index 88e3b3b8302..29f2cb8342e 100644
--- a/vnext/Microsoft.ReactNative.IntegrationTests/packages.experimentalwinui3.lock.json
+++ b/vnext/Microsoft.ReactNative.IntegrationTests/packages.experimentalwinui3.lock.json
@@ -33,8 +33,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -84,7 +84,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/packages.lock.json b/vnext/Microsoft.ReactNative.IntegrationTests/packages.lock.json
index 88e3b3b8302..29f2cb8342e 100644
--- a/vnext/Microsoft.ReactNative.IntegrationTests/packages.lock.json
+++ b/vnext/Microsoft.ReactNative.IntegrationTests/packages.lock.json
@@ -33,8 +33,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -84,7 +84,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/packages.newarch.experimentalwinui3.lock.json b/vnext/Microsoft.ReactNative.IntegrationTests/packages.newarch.experimentalwinui3.lock.json
index ada7ad87276..018fcfd93b5 100644
--- a/vnext/Microsoft.ReactNative.IntegrationTests/packages.newarch.experimentalwinui3.lock.json
+++ b/vnext/Microsoft.ReactNative.IntegrationTests/packages.newarch.experimentalwinui3.lock.json
@@ -43,8 +43,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -91,7 +91,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250127003-experimental3, )",
"ReactCommon": "[1.0.0, )",
diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/packages.newarch.lock.json b/vnext/Microsoft.ReactNative.IntegrationTests/packages.newarch.lock.json
index 599f7fe352e..e9634c96aad 100644
--- a/vnext/Microsoft.ReactNative.IntegrationTests/packages.newarch.lock.json
+++ b/vnext/Microsoft.ReactNative.IntegrationTests/packages.newarch.lock.json
@@ -43,8 +43,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -91,7 +91,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
"ReactCommon": "[1.0.0, )",
diff --git a/vnext/Microsoft.ReactNative.Managed.IntegrationTests/packages.lock.json b/vnext/Microsoft.ReactNative.Managed.IntegrationTests/packages.lock.json
index e9032e277e4..afc979a07a8 100644
--- a/vnext/Microsoft.ReactNative.Managed.IntegrationTests/packages.lock.json
+++ b/vnext/Microsoft.ReactNative.Managed.IntegrationTests/packages.lock.json
@@ -56,8 +56,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.Net.Native.Compiler": {
"type": "Transitive",
@@ -332,7 +332,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json b/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json
index e9032e277e4..afc979a07a8 100644
--- a/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json
+++ b/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json
@@ -56,8 +56,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.Net.Native.Compiler": {
"type": "Transitive",
@@ -332,7 +332,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/vnext/Microsoft.ReactNative.Managed/packages.lock.json b/vnext/Microsoft.ReactNative.Managed/packages.lock.json
index 97fba5a88fa..202c208c15e 100644
--- a/vnext/Microsoft.ReactNative.Managed/packages.lock.json
+++ b/vnext/Microsoft.ReactNative.Managed/packages.lock.json
@@ -36,8 +36,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.Net.Native.Compiler": {
"type": "Transitive",
@@ -179,7 +179,7 @@
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/DebuggerUIIsland.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/DebuggerUIIsland.cpp
new file mode 100644
index 00000000000..eb23179c9ad
--- /dev/null
+++ b/vnext/Microsoft.ReactNative/Fabric/Composition/DebuggerUIIsland.cpp
@@ -0,0 +1,169 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+#include "pch.h"
+#include "DebuggerUIIsland.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include "CompositionContextHelper.h"
+#include "TextDrawing.h"
+
+namespace winrt::Microsoft::ReactNative::implementation {
+
+constexpr float debuggerUIFontSize = 10.0f;
+constexpr float debuggerTextMargin = 4.0f;
+
+DebuggerUIIsland::DebuggerUIIsland(
+ const winrt::Microsoft::UI::Composition::Compositor &compositor,
+ winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
+ winrt::Microsoft::ReactNative::Composition::Theme theme) noexcept
+ : m_compositor(compositor), m_compContext(compContext), m_theme(theme) {
+ m_backgroundVisual = m_compositor.CreateSpriteVisual();
+ m_backgroundVisual.RelativeSizeAdjustment({1.0f, 1.0f});
+
+ auto backgroundBrush = m_compositor.CreateColorBrush({100, 0, 0, 0});
+ m_backgroundVisual.Brush(backgroundBrush);
+
+ m_TextVisual = m_compositor.CreateSpriteVisual();
+ m_TextVisual.IsPixelSnappingEnabled(true);
+
+ m_backgroundVisual.Children().InsertAtTop(m_TextVisual);
+}
+
+DebuggerUIIsland::~DebuggerUIIsland() noexcept {
+ m_island.StateChanged(m_islandStateChangedToken);
+}
+
+void DebuggerUIIsland::Redraw() noexcept {
+ if (!m_island)
+ return;
+
+ if (m_island.ActualSize().x == 0 || m_island.ActualSize().y == 0)
+ return;
+
+ auto scaleFactor = m_island.Environment().DisplayScale();
+
+ auto attributedString = facebook::react::AttributedString{};
+ auto fragment = facebook::react::AttributedString::Fragment{};
+ fragment.string = m_message;
+ fragment.textAttributes.fontSize = debuggerUIFontSize;
+ attributedString.appendFragment(std::move(fragment));
+
+ // Resume Icon
+ auto iconFragment = facebook::react::AttributedString::Fragment{};
+ iconFragment.string = " \uF08F";
+ iconFragment.textAttributes.fontFamily = "Segoe Fluent Icons";
+ iconFragment.textAttributes.fontSize = debuggerUIFontSize;
+ attributedString.appendFragment(std::move(iconFragment));
+
+ auto attributedStringBox = facebook::react::AttributedStringBox{attributedString};
+
+ facebook::react::LayoutConstraints constraints;
+ constraints.maximumSize.width = std::max(0.0f, m_island.ActualSize().x - debuggerTextMargin * 2 * scaleFactor);
+ constraints.maximumSize.height = std::max(0.0f, m_island.ActualSize().y - debuggerTextMargin * 2 * scaleFactor);
+
+ auto textAttributes = facebook::react::TextAttributes{};
+ textAttributes.foregroundColor = facebook::react::blackColor();
+
+ winrt::com_ptr<::IDWriteTextLayout> textLayout;
+ facebook::react::WindowsTextLayoutManager::GetTextLayout(attributedStringBox, {}, constraints, textLayout);
+
+ DWRITE_TEXT_METRICS tm;
+ textLayout->GetMetrics(&tm);
+
+ winrt::Windows::Foundation::Size surfaceSize = {
+ std::ceilf(std::min(constraints.maximumSize.width, tm.width + debuggerTextMargin * 2 * scaleFactor)),
+ std::ceilf(std::min(constraints.maximumSize.height, tm.height + debuggerTextMargin * 2 * scaleFactor))};
+ auto drawingSurface = m_compContext.CreateDrawingSurfaceBrush(
+ surfaceSize,
+ winrt::Windows::Graphics::DirectX::DirectXPixelFormat::B8G8R8A8UIntNormalized,
+ winrt::Windows::Graphics::DirectX::DirectXAlphaMode::Premultiplied);
+
+ POINT offset;
+ {
+ ::Microsoft::ReactNative::Composition::AutoDrawDrawingSurface autoDraw(drawingSurface, scaleFactor, &offset);
+ if (auto d2dDeviceContext = autoDraw.GetRenderTarget()) {
+ d2dDeviceContext->Clear(D2D1::ColorF{1.0f, 1.0f, 0.76f, 1.0f});
+
+ auto theme = winrt::get_self(m_theme);
+
+ Composition::RenderText(
+ *d2dDeviceContext,
+ *textLayout,
+ attributedStringBox.getValue(),
+ textAttributes,
+ {static_cast(offset.x + std::floorf(debuggerTextMargin * scaleFactor)),
+ static_cast(offset.y + std::floorf(debuggerTextMargin * scaleFactor))},
+ scaleFactor,
+ *theme);
+ }
+
+ drawingSurface.HorizontalAlignmentRatio(0.0f);
+ drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::Experimental::CompositionStretch::None);
+
+ m_TextVisual.Brush(winrt::Microsoft::ReactNative::Composition::Experimental::implementation::
+ MicrosoftCompositionContextHelper::InnerBrush(drawingSurface));
+ m_TextVisual.Size({surfaceSize.Width, surfaceSize.Height});
+
+ m_debuggerHitRect = {
+ m_island.ActualSize().x / 2 - tm.width / 2 + debuggerTextMargin * scaleFactor,
+ debuggerTextMargin * scaleFactor,
+ surfaceSize.Width,
+ surfaceSize.Height};
+
+ m_TextVisual.Offset({m_debuggerHitRect.X, m_debuggerHitRect.Y, 0.0f});
+ }
+}
+
+void DebuggerUIIsland::Message(std::string &&value) noexcept {
+ m_message = value;
+ Redraw();
+}
+
+winrt::Microsoft::UI::Content::ContentIsland DebuggerUIIsland::Island() noexcept {
+ if (!m_island) {
+ m_island = winrt::Microsoft::UI::Content::ContentIsland::Create(m_backgroundVisual);
+
+ m_islandStateChangedToken =
+ m_island.StateChanged([weakThis = weak_from_this()](
+ winrt::Microsoft::UI::Content::ContentIsland const &island,
+ winrt::Microsoft::UI::Content::ContentIslandStateChangedEventArgs const &args) {
+ if (auto pThis = weakThis.lock()) {
+ if (args.DidRasterizationScaleChange() || args.DidActualSizeChange()) {
+ pThis->Redraw();
+ }
+ }
+ });
+
+ auto pointerSource = winrt::Microsoft::UI::Input::InputPointerSource::GetForIsland(m_island);
+
+ m_islandPointerUpToken =
+ pointerSource.PointerReleased([weakThis = weak_from_this()](
+ winrt::Microsoft::UI::Input::InputPointerSource const &,
+ winrt::Microsoft::UI::Input::PointerEventArgs const &args) {
+ if (auto pThis = weakThis.lock()) {
+ auto position = args.CurrentPoint().Position();
+ if (position.X >= pThis->m_debuggerHitRect.X && position.Y >= pThis->m_debuggerHitRect.Y &&
+ position.X <= pThis->m_debuggerHitRect.X + pThis->m_debuggerHitRect.Width &&
+ position.Y <= pThis->m_debuggerHitRect.Y + pThis->m_debuggerHitRect.Height) {
+ pThis->m_resumedEvent(nullptr, nullptr);
+ }
+ }
+ });
+ }
+ return m_island;
+}
+
+winrt::event_token DebuggerUIIsland::Resumed(
+ winrt::Windows::Foundation::EventHandler const &handler) noexcept {
+ return m_resumedEvent.add(handler);
+}
+void DebuggerUIIsland::Resumed(winrt::event_token const &token) noexcept {
+ m_resumedEvent.remove(token);
+}
+
+} // namespace winrt::Microsoft::ReactNative::implementation
diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/DebuggerUIIsland.h b/vnext/Microsoft.ReactNative/Fabric/Composition/DebuggerUIIsland.h
new file mode 100644
index 00000000000..9fc719ad0d1
--- /dev/null
+++ b/vnext/Microsoft.ReactNative/Fabric/Composition/DebuggerUIIsland.h
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+#pragma once
+
+#include
+#include
+
+namespace winrt::Microsoft::ReactNative::implementation {
+
+struct DebuggerUIIsland : std::enable_shared_from_this {
+ DebuggerUIIsland(
+ const winrt::Microsoft::UI::Composition::Compositor &compositor,
+ winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
+ winrt::Microsoft::ReactNative::Composition::Theme theme) noexcept;
+ ~DebuggerUIIsland() noexcept;
+ winrt::Microsoft::UI::Content::ContentIsland Island() noexcept;
+
+ void Message(std::string &&value) noexcept;
+
+ winrt::event_token Resumed(
+ winrt::Windows::Foundation::EventHandler const &handler) noexcept;
+ void Resumed(winrt::event_token const &token) noexcept;
+
+ private:
+ void Redraw() noexcept;
+
+ winrt::event_token m_islandStateChangedToken;
+ winrt::event_token m_islandPointerUpToken;
+
+ winrt::Microsoft::UI::Composition::SpriteVisual m_backgroundVisual{nullptr};
+ winrt::Microsoft::UI::Composition::SpriteVisual m_TextVisual{nullptr};
+ winrt::Windows::Foundation::Rect m_debuggerHitRect{0, 0, 0, 0};
+ winrt::Microsoft::ReactNative::Composition::Theme m_theme{nullptr};
+ std::string m_message;
+
+ winrt::event> m_resumedEvent;
+ winrt::Microsoft::UI::Composition::Compositor m_compositor{nullptr};
+ winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext m_compContext{nullptr};
+ winrt::Microsoft::UI::Content::ContentIsland m_island{nullptr};
+};
+
+} // namespace winrt::Microsoft::ReactNative::implementation
diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp
index fd84303f8e1..84452bf67aa 100644
--- a/vnext/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp
+++ b/vnext/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp
@@ -103,9 +103,9 @@ void DebuggingOverlayComponentView::HandleCommand(
auto rootVisual = root->OuterVisual();
while (m_activeOverlays != 0) {
+ --m_activeOverlays;
auto visual = rootVisual.GetAt(root->overlayIndex() + m_activeOverlays);
rootVisual.Remove(visual);
- --m_activeOverlays;
}
}
return;
diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp
index 63829c6adab..c094cdc8c9b 100644
--- a/vnext/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp
+++ b/vnext/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp
@@ -276,6 +276,7 @@ void ReactNativeIsland::UpdateRootVisualSize() noexcept {
m_rootVisual.Size({m_size.Width * m_scaleFactor, m_size.Height * m_scaleFactor});
UpdateLoadingVisualSize();
+ UpdateDebuggerVisualSize();
}
void ReactNativeIsland::UpdateLoadingVisualSize() noexcept {
@@ -292,6 +293,13 @@ void ReactNativeIsland::UpdateLoadingVisualSize() noexcept {
}
}
+void ReactNativeIsland::UpdateDebuggerVisualSize() noexcept {
+ if (!m_debuggerChildSiteLink)
+ return;
+
+ m_debuggerChildSiteLink.ActualSize(m_size);
+}
+
float ReactNativeIsland::ScaleFactor() noexcept {
return m_scaleFactor;
}
@@ -476,6 +484,20 @@ void ReactNativeIsland::InitRootView(
m_CompositionEventHandler = std::make_shared<::Microsoft::ReactNative::CompositionEventHandler>(m_context, *this);
m_CompositionEventHandler->Initialize();
+ ::Microsoft::ReactNative::DebuggerNotifications::SubscribeShowDebuggerPausedOverlay(
+ m_context.Notifications().Handle(),
+ m_context.UIDispatcher().Handle(),
+ [weakThis = get_weak()](std::string message, std::function onResume) {
+ if (auto strongThis = weakThis.get()) {
+ strongThis->ShowDebuggerUI(message, onResume);
+ }
+ },
+ [weakThis = get_weak()]() {
+ if (auto strongThis = weakThis.get()) {
+ strongThis->HideDebuggerUI();
+ }
+ });
+
UpdateRootViewInternal();
m_isInitialized = true;
@@ -738,7 +760,10 @@ void ReactNativeIsland::ShowInstanceLoading() noexcept {
NotifySizeChanged();
UpdateLoadingVisualSize();
- InternalRootVisual().InsertAt(m_loadingVisual, m_hasRenderedVisual ? 1 : 0);
+ // ShowDebuggerUI(); // TEMP
+
+ InternalRootVisual().InsertAt(
+ m_loadingVisual, m_hasRenderedVisual ? (m_debuggerVisual ? 2 : 1) : (m_debuggerVisual ? 1 : 0));
}
void ReactNativeIsland::InitTextScaleMultiplier() noexcept {
@@ -759,6 +784,48 @@ void ReactNativeIsland::InitTextScaleMultiplier() noexcept {
});
}
+void ReactNativeIsland::ShowDebuggerUI(std::string message, const std::function &onResume) noexcept {
+ if (!m_debuggerVisual) {
+ auto compContext =
+ winrt::Microsoft::ReactNative::Composition::implementation::CompositionUIService::GetCompositionContext(
+ m_context.Properties().Handle());
+ m_debuggerVisual = compContext.CreateSpriteVisual();
+
+ m_debuggerChildSiteLink = winrt::Microsoft::UI::Content::ChildSiteLink::Create(
+ Island(),
+ winrt::Microsoft::ReactNative::Composition::Experimental::MicrosoftCompositionContextHelper::InnerVisual(
+ m_debuggerVisual)
+ .as());
+
+ m_debuggerUIIsland = std::make_shared(m_compositor, compContext, Theme());
+ m_debuggerUIIsland->Message(std::string(message));
+ m_debuggerVisual.RelativeSizeWithOffset({0.0f, 0.0f}, {1.0f, 1.0f});
+
+ m_debuggerUIIsland->Resumed(
+ [wkThis = get_weak(), onResume](
+ const winrt::Windows::Foundation::IInspectable &, const winrt::Windows::Foundation::IInspectable &) {
+ if (auto pThis = wkThis.get()) {
+ // pThis->HideDebuggerUI();
+ onResume();
+ }
+ });
+
+ InternalRootVisual().InsertAt(m_debuggerVisual, m_hasRenderedVisual ? 1 : 0);
+ m_debuggerUIIsland->Island().IsHitTestVisibleWhenTransparent(false);
+ m_debuggerChildSiteLink.Connect(m_debuggerUIIsland->Island());
+ }
+
+ m_debuggerVisual.IsVisible(true);
+
+ UpdateRootVisualSize();
+}
+
+void ReactNativeIsland::HideDebuggerUI() noexcept {
+ if (m_debuggerVisual) {
+ m_debuggerVisual.IsVisible(false);
+ }
+}
+
winrt::Windows::Foundation::Size ReactNativeIsland::Measure(
const winrt::Microsoft::ReactNative::LayoutConstraints &layoutConstraints,
const winrt::Windows::Foundation::Point &viewportOffset) const {
diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h b/vnext/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h
index 0a306125890..f0f132138f0 100644
--- a/vnext/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h
+++ b/vnext/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h
@@ -7,11 +7,14 @@
#include
#include
+#include
#include
#include
#include
+#include
#include
#include "CompositionEventHandler.h"
+#include "DebuggerUIIsland.h"
#include "PortalComponentView.h"
#include "ReactHost/React.h"
@@ -178,6 +181,9 @@ struct ReactNativeIsland
std::shared_ptr<::Microsoft::ReactNative::CompositionEventHandler> m_CompositionEventHandler;
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual m_rootVisual{nullptr};
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_loadingVisual{nullptr};
+ winrt::Microsoft::UI::Content::ChildSiteLink m_debuggerChildSiteLink{nullptr};
+ std::shared_ptr m_debuggerUIIsland;
+ winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_debuggerVisual{nullptr};
winrt::Microsoft::ReactNative::Composition::Experimental::IActivityVisual m_loadingActivityVisual{nullptr};
winrt::Microsoft::ReactNative::Composition::ICustomResourceLoader m_resources{nullptr};
winrt::Microsoft::ReactNative::Composition::Theme m_theme{nullptr};
@@ -193,8 +199,11 @@ struct ReactNativeIsland
void ShowInstanceLoaded() noexcept;
void ShowInstanceError() noexcept;
void ShowInstanceLoading() noexcept;
+ void ShowDebuggerUI(std::string message, const std::function &onResume) noexcept;
+ void HideDebuggerUI() noexcept;
void UpdateRootVisualSize() noexcept;
void UpdateLoadingVisualSize() noexcept;
+ void UpdateDebuggerVisualSize() noexcept;
Composition::Experimental::IDrawingSurfaceBrush CreateLoadingVisualBrush() noexcept;
void ApplyConstraints(
const winrt::Microsoft::ReactNative::LayoutConstraints &layoutConstraintsIn,
diff --git a/vnext/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp b/vnext/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp
index f530668a7e1..a853f712d43 100644
--- a/vnext/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp
+++ b/vnext/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp
@@ -165,6 +165,9 @@ void FabricUIManager::setProps(facebook::react::SurfaceId surfaceId, const folly
}
void FabricUIManager::stopSurface(facebook::react::SurfaceId surfaceId) noexcept {
+ if (surfaceId == -1) {
+ return;
+ }
visit(surfaceId, [&](const facebook::react::SurfaceHandler &surfaceHandler) {
surfaceHandler.stop();
m_scheduler->unregisterSurface(surfaceHandler);
@@ -174,7 +177,9 @@ void FabricUIManager::stopSurface(facebook::react::SurfaceId surfaceId) noexcept
std::unique_lock lock(m_handlerMutex);
auto iterator = m_handlerRegistry.find(surfaceId);
- m_handlerRegistry.erase(iterator);
+ if (iterator != m_handlerRegistry.end()) {
+ m_handlerRegistry.erase(iterator);
+ }
}
auto &rootDescriptor = m_registry.componentViewDescriptorWithTag(surfaceId);
diff --git a/vnext/Microsoft.ReactNative/Fabric/platform/react/threading/TaskDispatchThread.cpp b/vnext/Microsoft.ReactNative/Fabric/platform/react/threading/TaskDispatchThread.cpp
index 9c7318103bd..945d28ee97e 100644
--- a/vnext/Microsoft.ReactNative/Fabric/platform/react/threading/TaskDispatchThread.cpp
+++ b/vnext/Microsoft.ReactNative/Fabric/platform/react/threading/TaskDispatchThread.cpp
@@ -12,8 +12,11 @@
#include
#include
-#include
+#include
#include
+#include
+#include
+#include
#include
#include
@@ -25,40 +28,88 @@
namespace facebook::react {
-TaskDispatchThread::TaskDispatchThread(std::string threadName, int priorityOffset) noexcept
- : threadName_(std::move(threadName)) {
-#ifdef ANDROID
- // Attaches the thread to JVM just in case anything calls out to Java
- thread_ = std::thread([&]() {
- facebook::jni::ThreadScope::WithClassLoader([&]() {
- int result = setpriority(PRIO_PROCESS, static_cast(::syscall(SYS_gettid)), priorityOffset);
+class TaskDispatchThread::Impl : public std::enable_shared_from_this {
+ public:
+ Impl(std::string &&threadName) noexcept;
+ ~Impl() noexcept;
+
+ void start() noexcept;
+ bool isOnThread() noexcept;
+ bool isRunning() noexcept;
+ void runAsync(TaskFn &&task, std::chrono::milliseconds delayMs = std::chrono::milliseconds::zero()) noexcept;
+ void runSync(TaskFn &&task) noexcept;
+ void quit() noexcept;
+ void loop() noexcept;
+
+ private:
+ struct Task {
+ TimePoint dispatchTime;
+ TaskFn fn;
+
+ Task(TimePoint dispatchTime, TaskFn &&fn) : dispatchTime(dispatchTime), fn(std::move(fn)) {}
+
+ bool operator<(const Task &other) const {
+ // Have the earliest tasks be at the front of the queue.
+ return dispatchTime > other.dispatchTime;
+ }
+ };
+
+ std::mutex queueLock_;
+ std::condition_variable loopCv_;
+ std::priority_queue queue_;
+ std::atomic running_{true};
+ std::string threadName_;
+ std::thread thread_;
+};
+
+TaskDispatchThread::TaskDispatchThread(std::string threadName, int /*priorityOffset*/) noexcept
+ : impl_(std::make_shared(std::move(threadName))) {
+ impl_->start();
+}
- if (result != 0) {
- LOG(INFO) << " setCurrentThreadPriority failed with pri errno: " << errno;
- }
+TaskDispatchThread::~TaskDispatchThread() noexcept {
+ impl_->quit();
+}
- loop();
- });
- });
+bool TaskDispatchThread::isOnThread() noexcept {
+ return impl_->isOnThread();
+}
-#else
- thread_ = std::thread(&TaskDispatchThread::loop, this);
-#endif
+bool TaskDispatchThread::isRunning() noexcept {
+ return impl_->isRunning();
}
-TaskDispatchThread::~TaskDispatchThread() noexcept {
+void TaskDispatchThread::runAsync(TaskFn &&task, std::chrono::milliseconds delayMs) noexcept {
+ impl_->runAsync(std::move(task), delayMs);
+}
+
+void TaskDispatchThread::runSync(TaskFn &&task) noexcept {
+ impl_->runSync(std::move(task));
+}
+
+void TaskDispatchThread::quit() noexcept {
+ impl_->quit();
+}
+
+TaskDispatchThread::Impl::Impl(std::string &&threadName) noexcept : threadName_(std::move(threadName)) {}
+
+TaskDispatchThread::Impl::~Impl() noexcept {
quit();
}
-bool TaskDispatchThread::isOnThread() noexcept {
+void TaskDispatchThread::Impl::start() noexcept {
+ thread_ = std::thread([self = shared_from_this()]() { self->loop(); });
+}
+
+bool TaskDispatchThread::Impl::isOnThread() noexcept {
return std::this_thread::get_id() == thread_.get_id();
}
-bool TaskDispatchThread::isRunning() noexcept {
+bool TaskDispatchThread::Impl::isRunning() noexcept {
return running_;
}
-void TaskDispatchThread::runAsync(TaskFn &&task, std::chrono::milliseconds delayMs) noexcept {
+void TaskDispatchThread::Impl::runAsync(TaskFn &&task, std::chrono::milliseconds delayMs) noexcept {
if (!running_) {
return;
}
@@ -68,7 +119,7 @@ void TaskDispatchThread::runAsync(TaskFn &&task, std::chrono::milliseconds delay
loopCv_.notify_one();
}
-void TaskDispatchThread::runSync(TaskFn &&task) noexcept {
+void TaskDispatchThread::Impl::runSync(TaskFn &&task) noexcept {
std::promise promise;
runAsync([&]() {
if (running_) {
@@ -79,7 +130,7 @@ void TaskDispatchThread::runSync(TaskFn &&task) noexcept {
promise.get_future().wait();
}
-void TaskDispatchThread::quit() noexcept {
+void TaskDispatchThread::Impl::quit() noexcept {
if (!running_) {
return;
}
@@ -94,7 +145,7 @@ void TaskDispatchThread::quit() noexcept {
}
}
-void TaskDispatchThread::loop() noexcept {
+void TaskDispatchThread::Impl::loop() noexcept {
if (!threadName_.empty()) {
folly::setThreadName(threadName_);
}
diff --git a/vnext/Microsoft.ReactNative/Fabric/platform/react/threading/TaskDispatchThread.h b/vnext/Microsoft.ReactNative/Fabric/platform/react/threading/TaskDispatchThread.h
index 1f161ca6997..38fd14aca49 100644
--- a/vnext/Microsoft.ReactNative/Fabric/platform/react/threading/TaskDispatchThread.h
+++ b/vnext/Microsoft.ReactNative/Fabric/platform/react/threading/TaskDispatchThread.h
@@ -11,11 +11,8 @@
#pragma once
#include
-#include
#include
-#include
-#include
-#include
+#include
namespace facebook::react {
@@ -47,27 +44,9 @@ class TaskDispatchThread {
/** Shut down and clean up the thread. */
void quit() noexcept;
- protected:
- struct Task {
- TimePoint dispatchTime;
- TaskFn fn;
-
- Task(TimePoint dispatchTime, TaskFn &&fn) : dispatchTime(dispatchTime), fn(std::move(fn)) {}
-
- bool operator<(const Task &other) const {
- // Have the earliest tasks be at the front of the queue.
- return dispatchTime > other.dispatchTime;
- }
- };
-
- void loop() noexcept;
-
- std::mutex queueLock_;
- std::condition_variable loopCv_;
- std::priority_queue queue_;
- std::atomic running_{true};
- std::string threadName_;
- std::thread thread_;
+ private:
+ class Impl;
+ std::shared_ptr impl_;
};
} // namespace facebook::react
diff --git a/vnext/Microsoft.ReactNative/JsiApi.cpp b/vnext/Microsoft.ReactNative/JsiApi.cpp
index d074fff39f7..3408bd28163 100644
--- a/vnext/Microsoft.ReactNative/JsiApi.cpp
+++ b/vnext/Microsoft.ReactNative/JsiApi.cpp
@@ -479,7 +479,7 @@ facebook::jsi::JSError const &jsError) { \
}();
)JS");
// TODO: consider implementing this script as a resource file and loading it with the resource URL.
- jsiRuntime->evaluateJavaScript(jsiPalBuffer, "Form_JSI_API_not_a_real_file");
+ jsiRuntime->evaluateJavaScript(jsiPalBuffer, "jsi-internal://host-function-manager.js");
ReactNative::JsiRuntime abiJsiResult{make(Mso::Copy(jsiRuntimeHolder), Mso::Copy(jsiRuntime))};
std::scoped_lock lock{s_mutex};
auto it = s_jsiRuntimeMap.try_emplace(reinterpret_cast(jsiRuntime.get()), abiJsiResult);
diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj
index b50fab3cadb..f8097e89ed4 100644
--- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj
+++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj
@@ -268,6 +268,7 @@
Code
+
diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters
index ad0c2b22282..e2480686490 100644
--- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters
+++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters
@@ -313,6 +313,9 @@
ReactHost
+
+ ReactHost
+
ReactHost
diff --git a/vnext/Microsoft.ReactNative/ReactHost/DebuggerNotifications.h b/vnext/Microsoft.ReactNative/ReactHost/DebuggerNotifications.h
new file mode 100644
index 00000000000..6a083140a34
--- /dev/null
+++ b/vnext/Microsoft.ReactNative/ReactHost/DebuggerNotifications.h
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+#pragma once
+
+#include
+
+namespace Microsoft::ReactNative {
+
+struct DebuggerNotifications {
+ static winrt::Microsoft::ReactNative::IReactPropertyName ShowDebuggerPausedOverlayEventName() noexcept {
+ static winrt::Microsoft::ReactNative::IReactPropertyName propertyName{
+ winrt::Microsoft::ReactNative::ReactPropertyBagHelper::GetName(
+ winrt::Microsoft::ReactNative::ReactPropertyBagHelper::GetNamespace(L"ReactNative.Debugger"),
+ L"ShowDebuggerPausedOverlay")};
+ return propertyName;
+ }
+
+ static void OnShowDebuggerPausedOverlay(
+ winrt::Microsoft::ReactNative::IReactNotificationService const &service,
+ std::string message,
+ std::function onResume) {
+ const winrt::Microsoft::ReactNative::ReactNonAbiValue>> nonAbiValue{
+ std::in_place, std::tie(message, onResume)};
+ service.SendNotification(ShowDebuggerPausedOverlayEventName(), nullptr, nonAbiValue);
+ }
+
+ static void OnHideDebuggerPausedOverlay(winrt::Microsoft::ReactNative::IReactNotificationService const &service) {
+ service.SendNotification(ShowDebuggerPausedOverlayEventName(), nullptr, nullptr);
+ }
+
+ static winrt::Microsoft::ReactNative::IReactNotificationSubscription SubscribeShowDebuggerPausedOverlay(
+ winrt::Microsoft::ReactNative::IReactNotificationService const &service,
+ winrt::Microsoft::ReactNative::IReactDispatcher const &dispatcher,
+ std::function)> showCallback,
+ std::function hideCallback) {
+ return service.Subscribe(
+ ShowDebuggerPausedOverlayEventName(),
+ dispatcher,
+ [showCallback, hideCallback](auto &&, winrt::Microsoft::ReactNative::IReactNotificationArgs const &args) {
+ if (args.Data()) {
+ const auto [message, onResume] = args.Data()
+ .as>>>()
+ .Value();
+ showCallback(message, onResume);
+ } else {
+ hideCallback();
+ }
+ });
+ }
+};
+
+} // namespace Microsoft::ReactNative
diff --git a/vnext/Microsoft.ReactNative/ReactHost/React.h b/vnext/Microsoft.ReactNative/ReactHost/React.h
index dc7867f39b8..e509ddcb2ba 100644
--- a/vnext/Microsoft.ReactNative/ReactHost/React.h
+++ b/vnext/Microsoft.ReactNative/ReactHost/React.h
@@ -33,6 +33,10 @@
#include
#endif
+namespace facebook::react::jsinspector_modern {
+class HostTarget;
+} // namespace facebook::react::jsinspector_modern
+
namespace Mso::React {
// Forward declarations
@@ -216,9 +220,9 @@ struct ReactOptions {
//! Base path of the SDX. The absolute path of the SDX can be constructed from this and the Identity.
std::string BundleRootPath;
- //! Javascript Bundles
- //! This List includes both Platform and User Javascript Bundles
- //! Bundles are loaded into Javascript engine in the same order
+ //! JavaScript Bundles
+ //! This List includes both Platform and User JavaScript Bundles
+ //! Bundles are loaded into JavaScript engine in the same order
//! as they are specified in this list.
std::vector> JSBundles;
@@ -237,7 +241,7 @@ struct ReactOptions {
//! during development to report JavaScript errors to users
std::shared_ptr RedBoxHandler;
- //! Flag to suggest sdx owner's preference on enabling Bytecode caching in Javascript Engine for corresponding SDX.
+ //! Flag to suggest sdx owner's preference on enabling Bytecode caching in JavaScript Engine for corresponding SDX.
bool EnableBytecode{true};
//! Flag controlling whether the JavaScript engine uses JIT compilation.
@@ -347,6 +351,9 @@ struct ReactOptions {
//! The callback is called when IReactInstance is destroyed and must not be used anymore.
//! It is called from the native queue.
OnReactInstanceDestroyedCallback OnInstanceDestroyed;
+
+ //! The HostTarget instance for modern inspector integration.
+ facebook::react::jsinspector_modern::HostTarget *InspectorHostTarget{nullptr};
};
//! IReactHost manages a ReactNative instance.
diff --git a/vnext/Microsoft.ReactNative/ReactHost/ReactHost.cpp b/vnext/Microsoft.ReactNative/ReactHost/ReactHost.cpp
index 56ce0f97635..cb7737ae6ed 100644
--- a/vnext/Microsoft.ReactNative/ReactHost/ReactHost.cpp
+++ b/vnext/Microsoft.ReactNative/ReactHost/ReactHost.cpp
@@ -8,9 +8,16 @@
#include
+#include
+#include
#include
#include
+#include "Inspector/ReactInspectorThread.h"
+#include "ReactHost/DebuggerNotifications.h"
+
+using namespace facebook::react;
+
namespace Mso::React {
//=============================================================================================
@@ -282,6 +289,10 @@ bool ReactOptions::EnableDefaultCrashHandler() const noexcept {
return winrt::unbox_value_or(properties.Get(EnableDefaultCrashHandlerProperty()), false);
}
+//=============================================================================================
+// ReactNativeWindowsFeatureFlags implementation
+//=============================================================================================
+
class ReactNativeWindowsFeatureFlags : public facebook::react::ReactNativeFeatureFlagsDefaults {
public:
bool enableBridgelessArchitecture() override {
@@ -295,9 +306,59 @@ class ReactNativeWindowsFeatureFlags : public facebook::react::ReactNativeFeatur
bool enableCppPropsIteratorSetter() override {
return true;
}
+
+ bool fuseboxEnabledRelease() override {
+ return true; // Enable Fusebox (modern CDP backend) by default for React Native Windows
+ }
+
+ bool fuseboxNetworkInspectionEnabled() override {
+ return true; // Enable network inspection support in Fusebox
+ }
+};
+
+//=============================================================================================
+// ReactInspectorHostTargetDelegate implementation
+//=============================================================================================
+
+class ReactInspectorHostTargetDelegate : public jsinspector_modern::HostTargetDelegate,
+ public std::enable_shared_from_this {
+ public:
+ ReactInspectorHostTargetDelegate(Mso::WeakPtr &&reactHost) noexcept : m_reactHost(std::move(reactHost)) {}
+
+ jsinspector_modern::HostTargetMetadata getMetadata() override {
+ // TODO: (vmoroz) provide more info
+ return {
+ .integrationName = "React Native Windows (Host)",
+ };
+ }
+
+ void onReload(jsinspector_modern::HostTargetDelegate::PageReloadRequest const &request) override {
+ if (Mso::CntPtr reactHost = m_reactHost.GetStrongPtr()) {
+ reactHost->ReloadInstance();
+ }
+ }
+
+ void onSetPausedInDebuggerMessage(
+ jsinspector_modern::HostTargetDelegate::OverlaySetPausedInDebuggerMessageRequest const &request) override {
+ if (Mso::CntPtr reactHost = m_reactHost.GetStrongPtr()) {
+ auto notifications = reactHost->Options().Notifications;
+ if (request.message.has_value()) {
+ ::Microsoft::ReactNative::DebuggerNotifications::OnShowDebuggerPausedOverlay(
+ notifications, request.message.value(), [weakReactHost = m_reactHost]() {
+ if (Mso::CntPtr strongReactHost = weakReactHost.GetStrongPtr()) {
+ strongReactHost->OnDebuggerResume();
+ }
+ });
+ } else {
+ ::Microsoft::ReactNative::DebuggerNotifications::OnHideDebuggerPausedOverlay(notifications);
+ }
+ }
+ }
+
+ private:
+ Mso::WeakPtr m_reactHost;
};
-std::once_flag g_FlagInitFeatureFlags;
//=============================================================================================
// ReactHost implementation
//=============================================================================================
@@ -305,9 +366,16 @@ std::once_flag g_FlagInitFeatureFlags;
ReactHost::ReactHost(Mso::DispatchQueue const &queue) noexcept
: Super{EnsureSerialQueue(queue)},
m_options{Queue(), m_mutex},
- m_notifyWhenClosed{ReactHostRegistry::Register(*this), Queue(), m_mutex} {
- std::call_once(g_FlagInitFeatureFlags, []() noexcept {
- facebook::react::ReactNativeFeatureFlags::override(std::make_unique());
+ m_notifyWhenClosed{ReactHostRegistry::Register(*this), Queue(), m_mutex},
+ m_inspectorHostTargetDelegate{std::make_shared(this)},
+ m_inspectorHostTarget{
+ jsinspector_modern::HostTarget::create(*m_inspectorHostTargetDelegate, [](std::function &&callback) {
+ ::Microsoft::ReactNative::ReactInspectorThread::Instance().Post(
+ [callback = std::move(callback)]() { callback(); });
+ })} {
+ static std::once_flag initFeatureFlagsOnce;
+ std::call_once(initFeatureFlagsOnce, []() noexcept {
+ ReactNativeFeatureFlags::override(std::make_unique());
});
}
@@ -319,15 +387,16 @@ void ReactHost::Finalize() noexcept {
// Since each AsyncAction has a strong ref count to ReactHost, the AsyncActionQueue must be empty.
// Thus, we only need to call UnloadInQueue to unload ReactInstance if the ReactHost is not closed yet.
if (Mso::Promise notifyWhenClosed = m_notifyWhenClosed.Exchange(nullptr)) {
- UnloadInQueue(0).Then(
- [notifyWhenClosed = std::move(notifyWhenClosed)]() noexcept { notifyWhenClosed.TrySetValue(); });
+ UnloadInQueue(UnloadReason::CloseHost, 0)
+ .Then(
+ [notifyWhenClosed = std::move(notifyWhenClosed)]() noexcept { notifyWhenClosed.TrySetValue(); });
}
}
void ReactHost::Close() noexcept {
InvokeInQueue([this]() noexcept {
// Put the ReactHost to the closed state, unload ReactInstance, and notify the closing Promise.
- auto whenClosed = m_actionQueue.Load()->PostAction(MakeUnloadInstanceAction());
+ auto whenClosed = m_actionQueue.Load()->PostAction(MakeUnloadInstanceAction(UnloadReason::CloseHost));
// After we set the m_notifyWhenClosed to null, the ReactHost is considered to be closed.
Mso::SetPromiseValue(m_notifyWhenClosed.Exchange(nullptr), std::move(whenClosed));
@@ -379,12 +448,14 @@ Mso::Future ReactHost::ReloadInstance() noexcept {
Mso::Future ReactHost::ReloadInstanceWithOptions(ReactOptions &&options) noexcept {
return PostInQueue([this, options = std::move(options)]() mutable noexcept {
- return m_actionQueue.Load()->PostActions({MakeUnloadInstanceAction(), MakeLoadInstanceAction(std::move(options))});
+ return m_actionQueue.Load()->PostActions(
+ {MakeUnloadInstanceAction(UnloadReason::Unload), MakeLoadInstanceAction(std::move(options))});
});
}
Mso::Future ReactHost::UnloadInstance() noexcept {
- return PostInQueue([this]() noexcept { return m_actionQueue.Load()->PostAction(MakeUnloadInstanceAction()); });
+ return PostInQueue(
+ [this]() noexcept { return m_actionQueue.Load()->PostAction(MakeUnloadInstanceAction(UnloadReason::Unload)); });
}
AsyncAction ReactHost::MakeLoadInstanceAction(ReactOptions &&options) noexcept {
@@ -393,11 +464,13 @@ AsyncAction ReactHost::MakeLoadInstanceAction(ReactOptions &&options) noexcept {
};
}
-AsyncAction ReactHost::MakeUnloadInstanceAction() noexcept {
+AsyncAction ReactHost::MakeUnloadInstanceAction(UnloadReason reason) noexcept {
Mso::Internal::VerifyIsInQueueElseCrash(Queue());
size_t unloadActionId = ++m_nextUnloadActionId;
m_pendingUnloadActionId = unloadActionId;
- return [spThis = Mso::CntPtr{this}, unloadActionId]() noexcept { return spThis->UnloadInQueue(unloadActionId); };
+ return [spThis = Mso::CntPtr{this}, reason, unloadActionId]() noexcept {
+ return spThis->UnloadInQueue(reason, unloadActionId);
+ };
}
Mso::CntPtr ReactHost::MakeViewHost(ReactViewOptions &&options) noexcept {
@@ -428,6 +501,18 @@ Mso::Future ReactHost::LoadInQueue(ReactOptions &&options) noexcept {
return Mso::MakeCanceledFuture();
}
+ // Start or stop inspector page if needed.
+ // Make sure to update the both copies of options.
+ if (IsInspectable()) {
+ AddInspectorPage();
+ options.InspectorHostTarget = m_inspectorHostTarget.get();
+ m_options.Load().InspectorHostTarget = m_inspectorHostTarget.get();
+ } else {
+ RemoveInspectorPage();
+ options.InspectorHostTarget = nullptr;
+ m_options.Load().InspectorHostTarget = nullptr;
+ }
+
Mso::Promise whenCreated;
Mso::Promise whenLoaded;
@@ -463,7 +548,7 @@ Mso::Future ReactHost::LoadInQueue(ReactOptions &&options) noexcept {
});
}
-Mso::Future ReactHost::UnloadInQueue(size_t unloadActionId) noexcept {
+Mso::Future ReactHost::UnloadInQueue(UnloadReason reason, size_t unloadActionId) noexcept {
Mso::Internal::VerifyIsInQueueElseCrash(Queue());
// If the pending unload action Id does not match, then we have newer unload action,
@@ -485,21 +570,25 @@ Mso::Future ReactHost::UnloadInQueue(size_t unloadActionId) noexcept {
// We unload ReactInstance after all view instances are unloaded.
// It is safe to capture 'this' because the Unload action keeps a strong reference to ReactHost.
- return Mso::WhenAllCompleted(unloadCompletionList).Then(m_executor, [this](Mso::Maybe && /*value*/) noexcept {
- Mso::Future onUnloaded;
- if (auto reactInstance = m_reactInstance.Exchange(nullptr)) {
- onUnloaded = reactInstance->Destroy();
- }
-
- m_isInstanceUnloading.Store(false);
- m_lastError.Store({});
-
- if (!onUnloaded) {
- onUnloaded = Mso::MakeSucceededFuture();
- }
-
- return onUnloaded;
- });
+ return Mso::WhenAllCompleted(unloadCompletionList)
+ .Then(m_executor, [this, reason](Mso::Maybe && /*value*/) noexcept {
+ Mso::Future onUnloaded;
+ if (auto reactInstance = m_reactInstance.Exchange(nullptr)) {
+ onUnloaded = reactInstance->Destroy();
+ }
+
+ m_isInstanceUnloading.Store(false);
+ m_lastError.Store({});
+
+ if (!onUnloaded) {
+ onUnloaded = Mso::MakeSucceededFuture();
+ }
+
+ if (reason == UnloadReason::CloseHost) {
+ RemoveInspectorPage();
+ }
+ return onUnloaded;
+ });
}
void ReactHost::ForEachViewHost(const Mso::FunctorRef &action) noexcept {
@@ -528,6 +617,54 @@ void ReactHost::DetachViewHost(ReactViewHost &viewHost) noexcept {
viewHosts.erase(it);
}
+bool ReactHost::IsInspectable() noexcept {
+ ReactOptions &options = m_options.Load();
+ return options.JsiEngine() == JSIEngine::Hermes && options.UseDirectDebugger();
+}
+
+void ReactHost::AddInspectorPage() noexcept {
+ std::optional &inspectorPageId = m_inspectorPageId.Load();
+ if (inspectorPageId.has_value())
+ return;
+
+ jsinspector_modern::InspectorTargetCapabilities capabilities;
+ capabilities.nativePageReloads = true;
+ capabilities.prefersFuseboxFrontend = true;
+ // TODO: (vmoroz) improve the page name
+ inspectorPageId = jsinspector_modern::getInspectorInstance().addPage(
+ "React Native Windows (Experimental)",
+ "Hermes",
+ [weakInspectorHostTarget =
+ std::weak_ptr(m_inspectorHostTarget)](std::unique_ptr remote)
+ -> std::unique_ptr {
+ if (std::shared_ptr inspectorHostTarget = weakInspectorHostTarget.lock()) {
+ return inspectorHostTarget->connect(std::move(remote));
+ }
+
+ // This can happen if we're about to shut down. Reject the connection.
+ return nullptr;
+ },
+ capabilities);
+}
+
+void ReactHost::RemoveInspectorPage() noexcept {
+ std::optional &inspectorPageId = m_inspectorPageId.Load();
+ if (!inspectorPageId.has_value())
+ return;
+
+ jsinspector_modern::getInspectorInstance().removePage(*inspectorPageId);
+ inspectorPageId.reset();
+}
+
+void ReactHost::OnDebuggerResume() noexcept {
+ ::Microsoft::ReactNative::ReactInspectorThread::Instance().Post(
+ [weakInspectorHostTarget = std::weak_ptr(m_inspectorHostTarget)]() {
+ if (std::shared_ptr inspectorHostTarget = weakInspectorHostTarget.lock()) {
+ inspectorHostTarget->sendCommand(jsinspector_modern::HostCommand::DebuggerResume);
+ }
+ });
+}
+
//=============================================================================================
// ReactViewHost implementation
//=============================================================================================
@@ -579,8 +716,8 @@ Mso::Future ReactViewHost::AttachViewInstance(IReactViewInstance &viewInst
m_reactHost->AttachViewHost(*this);
return InitViewInstanceInQueue();
- //// Schedule the viewInstance load in the action queue since there can be other load actions in the queue that need
- //// to be consolidated.
+ // Schedule the viewInstance load in the action queue since there can be other load actions in the queue that need
+ // to be consolidated.
// return m_actionQueue.Load()->PostAction(MakeInitViewInstanceAction());
});
}
diff --git a/vnext/Microsoft.ReactNative/ReactHost/ReactHost.h b/vnext/Microsoft.ReactNative/ReactHost/ReactHost.h
index 765039d9542..b786772b233 100644
--- a/vnext/Microsoft.ReactNative/ReactHost/ReactHost.h
+++ b/vnext/Microsoft.ReactNative/ReactHost/ReactHost.h
@@ -3,6 +3,7 @@
#pragma once
+#include
#include
#include
#include "AsyncActionQueue.h"
@@ -15,6 +16,7 @@
namespace Mso::React {
+class ReactInspectorHostTargetDelegate;
class ReactViewHost;
//! ReactHost manages lifetime of ReactNative instance.
@@ -52,9 +54,6 @@ class ReactHost final : public Mso::ActiveObject {
Mso::CntPtr ActionQueue() const noexcept;
- Mso::Future LoadInQueue(ReactOptions &&options) noexcept;
- Mso::Future UnloadInQueue(size_t unloadActionId) noexcept;
-
void Close() noexcept;
bool IsClosed() const noexcept;
@@ -64,6 +63,12 @@ class ReactHost final : public Mso::ActiveObject {
template
Mso::Future PostInQueue(TCallback &&callback) noexcept;
+ private:
+ enum class UnloadReason {
+ Unload,
+ CloseHost,
+ };
+
private:
friend MakePolicy;
ReactHost(Mso::DispatchQueue const &queue) noexcept;
@@ -75,9 +80,18 @@ class ReactHost final : public Mso::ActiveObject {
void ForEachViewHost(const Mso::FunctorRef &action) noexcept;
AsyncAction MakeLoadInstanceAction(ReactOptions &&options) noexcept;
- AsyncAction MakeUnloadInstanceAction() noexcept;
+ AsyncAction MakeUnloadInstanceAction(UnloadReason reason) noexcept;
+
+ Mso::Future LoadInQueue(ReactOptions &&options) noexcept;
+ Mso::Future UnloadInQueue(UnloadReason reason, size_t unloadActionId) noexcept;
+
+ void OnDebuggerResume() noexcept;
+ bool IsInspectable() noexcept;
+ void AddInspectorPage() noexcept;
+ void RemoveInspectorPage() noexcept;
private:
+ friend class ReactInspectorHostTargetDelegate;
mutable std::mutex m_mutex;
const Mso::InvokeElsePostExecutor m_executor{Queue()};
const Mso::ActiveReadableField> m_actionQueue{
@@ -92,6 +106,10 @@ class ReactHost final : public Mso::ActiveObject {
size_t m_pendingUnloadActionId{0};
size_t m_nextUnloadActionId{0};
const Mso::ActiveField m_isInstanceUnloading{false, Queue()};
+
+ const std::shared_ptr m_inspectorHostTargetDelegate;
+ const std::shared_ptr m_inspectorHostTarget;
+ const Mso::ActiveField> m_inspectorPageId{Queue()};
};
//! Implements a cross-platform host for a React view
diff --git a/vnext/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp b/vnext/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp
index aefaaa3db63..eb394fb3544 100644
--- a/vnext/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp
+++ b/vnext/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp
@@ -66,6 +66,7 @@
#include
#include
#include
+#include "Inspector/ReactInspectorThread.h"
#endif
#if !defined(CORE_ABI) && !defined(USE_FABRIC)
@@ -553,6 +554,8 @@ std::shared_ptr ReactInstanceWin::CreateDevSetting
devSettings->useRuntimeScheduler = useRuntimeScheduler;
+ devSettings->inspectorHostTarget = m_options.InspectorHostTarget;
+
return devSettings;
}
@@ -664,16 +667,21 @@ void ReactInstanceWin::InitializeBridgeless() noexcept {
};
if (devSettings->useDirectDebugger) {
- ::Microsoft::ReactNative::GetSharedDevManager()->EnsureHermesInspector(
- devSettings->sourceBundleHost, devSettings->sourceBundlePort);
+ ::Microsoft::ReactNative::GetSharedDevManager()->EnsureInspectorPackagerConnection(
+ devSettings->sourceBundleHost, devSettings->sourceBundlePort, devSettings->bundleAppId);
}
m_jsiRuntimeHolder = std::make_shared(
devSettings, jsMessageThread, CreatePreparedScriptStore());
auto jsRuntime = std::make_unique(m_jsiRuntimeHolder);
jsRuntime->getRuntime();
- m_bridgelessReactInstance = std::make_unique(
- std::move(jsRuntime), jsMessageThread, timerManager, jsErrorHandlingFunc);
+
+ m_bridgelessReactInstance = std::make_shared(
+ std::move(jsRuntime),
+ jsMessageThread,
+ timerManager,
+ jsErrorHandlingFunc,
+ m_options.InspectorHostTarget);
auto bufferedRuntimeExecutor = m_bridgelessReactInstance->getBufferedRuntimeExecutor();
timerManager->setRuntimeExecutor(bufferedRuntimeExecutor);
@@ -695,6 +703,7 @@ void ReactInstanceWin::InitializeBridgeless() noexcept {
winrt::make(Mso::Copy(m_reactContext)));
facebook::react::ReactInstance::JSRuntimeFlags options;
+
m_bridgelessReactInstance->initializeRuntime(
options,
[=, onCreated = m_options.OnInstanceCreated, reactContext = m_reactContext](
@@ -748,7 +757,6 @@ void ReactInstanceWin::InitializeBridgeless() noexcept {
LoadJSBundlesBridgeless(devSettings);
SetupHMRClient();
-
} catch (std::exception &e) {
OnErrorWithMessage(e.what());
OnErrorWithMessage("ReactInstanceWin: Failed to create React Instance.");
@@ -1092,6 +1100,17 @@ Mso::Future ReactInstanceWin::Destroy() noexcept {
if (m_bridgelessReactInstance) {
if (auto jsMessageThread = m_jsMessageThread.Exchange(nullptr)) {
jsMessageThread->runOnQueueSync([&]() noexcept {
+ // Unregister from inspector BEFORE shutting down JS thread
+ if (m_bridgelessReactInstance && m_options.InspectorHostTarget) {
+ Mso::React::MessageDispatchQueue messageDispatchQueue{
+ ::Microsoft::ReactNative::ReactInspectorThread::Instance(), nullptr};
+ messageDispatchQueue.runOnQueueSync(
+ [weakBridgelessReactInstance = std::weak_ptr(m_bridgelessReactInstance)]() {
+ if (auto bridgelessReactInstance = weakBridgelessReactInstance.lock()) {
+ bridgelessReactInstance->unregisterFromInspector();
+ }
+ });
+ }
{
// Release the JSI runtime
std::scoped_lock lock{m_mutex};
diff --git a/vnext/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h b/vnext/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h
index 36c153df4e9..4d5125bc166 100644
--- a/vnext/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h
+++ b/vnext/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h
@@ -205,7 +205,7 @@ class ReactInstanceWin final : public Mso::ActiveObject
#ifdef USE_FABRIC
// Bridgeless
- std::unique_ptr m_bridgelessReactInstance;
+ std::shared_ptr m_bridgelessReactInstance;
#endif
std::atomic m_state{ReactInstanceState::Loading};
diff --git a/vnext/Microsoft.ReactNative/ReactRootView.cpp b/vnext/Microsoft.ReactNative/ReactRootView.cpp
index a697f76aa39..e04b0b813c2 100644
--- a/vnext/Microsoft.ReactNative/ReactRootView.cpp
+++ b/vnext/Microsoft.ReactNative/ReactRootView.cpp
@@ -5,14 +5,19 @@
#include "ReactRootView.g.cpp"
#include
+#include
#include
+#include
+#include
#include
#include
#include
#include
#include
+#include "InstanceManager.h"
#include "ReactNativeHost.h"
#include "ReactViewInstance.h"
+#include "Utils/KeyboardUtils.h"
#include "XamlUtils.h"
#include
@@ -34,6 +39,7 @@ ReactRootView::ReactRootView() noexcept : m_uiQueue(Mso::DispatchQueue::GetCurre
UpdatePerspective();
Loaded([this](auto &&, auto &&) {
::Microsoft::ReactNative::SetCompositor(::Microsoft::ReactNative::GetCompositor(*this));
+ SetupDevToolsShortcut();
});
}
@@ -45,6 +51,20 @@ void ReactRootView::ReactNativeHost(ReactNative::ReactNativeHost const &value) n
if (m_reactNativeHost != value) {
ReactViewHost(nullptr);
m_reactNativeHost = value;
+ const auto weakThis = this->get_weak();
+ ::Microsoft::ReactNative::DebuggerNotifications::SubscribeShowDebuggerPausedOverlay(
+ m_reactNativeHost.InstanceSettings().Notifications(),
+ m_reactNativeHost.InstanceSettings().UIDispatcher(),
+ [weakThis](std::string message, std::function onResume) {
+ if (auto strongThis = weakThis.get()) {
+ strongThis->ShowDebuggerPausedOverlay(message, onResume);
+ }
+ },
+ [weakThis]() {
+ if (auto strongThis = weakThis.get()) {
+ strongThis->HideDebuggerPausedOverlay();
+ }
+ });
ReloadView();
}
}
@@ -283,6 +303,65 @@ void ReactRootView::EnsureLoadingUI() noexcept {
}
}
+void ReactRootView::HideDebuggerPausedOverlay() noexcept {
+ m_isDebuggerPausedOverlayOpen = false;
+ if (m_debuggerPausedFlyout) {
+ m_debuggerPausedFlyout.Hide();
+ m_debuggerPausedFlyout = nullptr;
+ }
+}
+
+void ReactRootView::ShowDebuggerPausedOverlay(
+ const std::string &message,
+ const std::function &onResume) noexcept {
+ // Initialize content
+ const xaml::Controls::Grid contentGrid;
+ xaml::Controls::ColumnDefinition messageColumnDefinition;
+ xaml::Controls::ColumnDefinition buttonColumnDefinition;
+ messageColumnDefinition.MinWidth(60);
+ buttonColumnDefinition.MinWidth(36);
+ contentGrid.ColumnDefinitions().Append(messageColumnDefinition);
+ contentGrid.ColumnDefinitions().Append(buttonColumnDefinition);
+ xaml::Controls::TextBlock messageBlock;
+ messageBlock.Text(winrt::to_hstring(message));
+ messageBlock.FontWeight(winrt::Windows::UI::Text::FontWeights::SemiBold());
+ xaml::Controls::FontIcon resumeGlyph;
+ resumeGlyph.FontFamily(xaml::Media::FontFamily(L"Segoe MDL2 Assets"));
+ resumeGlyph.Foreground(xaml::Media::SolidColorBrush(winrt::Colors::Green()));
+ resumeGlyph.Glyph(L"\uF5B0");
+ resumeGlyph.HorizontalAlignment(xaml::HorizontalAlignment::Right);
+ resumeGlyph.PointerReleased([onResume](auto &&...) { onResume(); });
+ xaml::Controls::Grid::SetColumn(resumeGlyph, 1);
+ contentGrid.Children().Append(messageBlock);
+ contentGrid.Children().Append(resumeGlyph);
+
+ // Configure flyout
+ m_isDebuggerPausedOverlayOpen = true;
+ xaml::Style flyoutStyle(
+ {XAML_NAMESPACE_STR L".Controls.FlyoutPresenter", winrt::Windows::UI::Xaml::Interop::TypeKind::Metadata});
+ flyoutStyle.Setters().Append(winrt::Setter(
+ xaml::Controls::Control::CornerRadiusProperty(), winrt::box_value(xaml::CornerRadius{12, 12, 12, 12})));
+ flyoutStyle.Setters().Append(winrt::Setter(
+ xaml::Controls::Control::BackgroundProperty(),
+ winrt::box_value(xaml::Media::SolidColorBrush{FromArgb(255, 255, 255, 193)})));
+ flyoutStyle.Setters().Append(
+ winrt::Setter(xaml::FrameworkElement::MarginProperty(), winrt::box_value(xaml::Thickness{0, 12, 0, 0})));
+ m_debuggerPausedFlyout = xaml::Controls::Flyout{};
+ m_debuggerPausedFlyout.FlyoutPresenterStyle(flyoutStyle);
+ m_debuggerPausedFlyout.LightDismissOverlayMode(xaml::Controls::LightDismissOverlayMode::On);
+ m_debuggerPausedFlyout.Content(contentGrid);
+
+ // Disable light dismiss
+ m_debuggerPausedFlyout.Closing([weakThis = this->get_weak()](auto &&, const auto &args) {
+ if (auto strongThis = weakThis.get()) {
+ args.Cancel(strongThis->m_isDebuggerPausedOverlayOpen);
+ }
+ });
+
+ // Show flyout
+ m_debuggerPausedFlyout.ShowAt(*this);
+}
+
void ReactRootView::ShowInstanceLoaded() noexcept {
if (m_xamlRootView) {
ClearLoadingUI();
@@ -481,4 +560,33 @@ void ReactRootView::RemoveChildAt(uint32_t index) {
Children().RemoveAt(RNIndexToXamlIndex(index));
}
+bool IsCtrlShiftI(winrt::Windows::System::VirtualKey key) noexcept {
+ return (
+ key == winrt::Windows::System::VirtualKey::I &&
+ ::Microsoft::ReactNative::IsModifiedKeyPressed(
+ winrt::CoreWindow::GetForCurrentThread(), winrt::Windows::System::VirtualKey::Shift) &&
+ ::Microsoft::ReactNative::IsModifiedKeyPressed(
+ winrt::CoreWindow::GetForCurrentThread(), winrt::Windows::System::VirtualKey::Control));
+}
+
+void ReactRootView::SetupDevToolsShortcut() noexcept {
+ if (auto xamlRoot = XamlRoot()) {
+ if (std::find(m_subscribedDebuggerRoots.begin(), m_subscribedDebuggerRoots.end(), xamlRoot) ==
+ m_subscribedDebuggerRoots.end()) {
+ if (auto rootContent = xamlRoot.Content()) {
+ m_subscribedDebuggerRoots.push_back(xamlRoot);
+ rootContent.KeyDown(
+ [weakThis = this->get_weak()](const auto & /*sender*/, const xaml::Input::KeyRoutedEventArgs &args) {
+ if (const auto strongThis = weakThis.get()) {
+ if (IsCtrlShiftI(args.Key())) {
+ ::Microsoft::ReactNative::GetSharedDevManager()->OpenDevTools(
+ winrt::to_string(strongThis->m_reactNativeHost.InstanceSettings().BundleAppId()));
+ }
+ };
+ });
+ }
+ }
+ }
+}
+
} // namespace winrt::Microsoft::ReactNative::implementation
diff --git a/vnext/Microsoft.ReactNative/ReactRootView.h b/vnext/Microsoft.ReactNative/ReactRootView.h
index f35a3c3fd60..876ac7e38cb 100644
--- a/vnext/Microsoft.ReactNative/ReactRootView.h
+++ b/vnext/Microsoft.ReactNative/ReactRootView.h
@@ -72,6 +72,7 @@ struct ReactRootView : ReactRootViewT, ::Microsoft::ReactNative::
bool m_isPerspectiveEnabled{true};
bool m_isInitialized{false};
bool m_isJSViewAttached{false};
+ bool m_isDebuggerPausedOverlayOpen{false};
Mso::DispatchQueue m_uiQueue;
int64_t m_rootTag{-1};
std::unique_ptr m_reactOptions;
@@ -84,9 +85,11 @@ struct ReactRootView : ReactRootViewT, ::Microsoft::ReactNative::
std::shared_ptr<::Microsoft::ReactNative::PreviewKeyboardEventHandlerOnRoot> m_previewKeyboardEventHandlerOnRoot;
xaml::Controls::ContentControl m_focusSafeHarbor{nullptr};
xaml::Controls::ContentControl::LosingFocus_revoker m_focusSafeHarborLosingFocusRevoker{};
+ xaml::Controls::Flyout m_debuggerPausedFlyout{nullptr};
winrt::Grid m_greenBoxGrid{nullptr};
winrt::TextBlock m_waitingTextBlock{nullptr};
winrt::SystemNavigationManager::BackRequested_revoker m_backRequestedRevoker{};
+ std::vector m_subscribedDebuggerRoots{};
// Visual tree to support safe harbor
// this
@@ -102,6 +105,8 @@ struct ReactRootView : ReactRootViewT, ::Microsoft::ReactNative::
void UpdateRootViewInternal() noexcept;
void ClearLoadingUI() noexcept;
void EnsureLoadingUI() noexcept;
+ void HideDebuggerPausedOverlay() noexcept;
+ void ShowDebuggerPausedOverlay(const std::string &message, const std::function &onResume) noexcept;
void ShowInstanceLoaded() noexcept;
void ShowInstanceError() noexcept;
void ShowInstanceWaiting() noexcept;
@@ -112,6 +117,7 @@ struct ReactRootView : ReactRootViewT, ::Microsoft::ReactNative::
bool OnBackRequested() noexcept;
Mso::React::IReactViewHost *ReactViewHost() noexcept;
void ReactViewHost(Mso::React::IReactViewHost *viewHost) noexcept;
+ void SetupDevToolsShortcut() noexcept;
};
} // namespace winrt::Microsoft::ReactNative::implementation
diff --git a/vnext/Microsoft.ReactNative/Views/DevMenu.cpp b/vnext/Microsoft.ReactNative/Views/DevMenu.cpp
index 2d59627e885..38d1f17fcbd 100644
--- a/vnext/Microsoft.ReactNative/Views/DevMenu.cpp
+++ b/vnext/Microsoft.ReactNative/Views/DevMenu.cpp
@@ -6,7 +6,7 @@
#include "DevMenu.h"
#include
-#include "HermesSamplingProfiler.h"
+#include "Hermes/HermesSamplingProfiler.h"
#include "IReactDispatcher.h"
#include "Modules/DevSettingsModule.h"
diff --git a/vnext/Microsoft.ReactNative/packages.chakra.lock.json b/vnext/Microsoft.ReactNative/packages.chakra.lock.json
index bd23518b301..0602b9ec3c3 100644
--- a/vnext/Microsoft.ReactNative/packages.chakra.lock.json
+++ b/vnext/Microsoft.ReactNative/packages.chakra.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
diff --git a/vnext/Microsoft.ReactNative/packages.experimentalwinui3.lock.json b/vnext/Microsoft.ReactNative/packages.experimentalwinui3.lock.json
index bd23518b301..0602b9ec3c3 100644
--- a/vnext/Microsoft.ReactNative/packages.experimentalwinui3.lock.json
+++ b/vnext/Microsoft.ReactNative/packages.experimentalwinui3.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
diff --git a/vnext/Microsoft.ReactNative/packages.lock.json b/vnext/Microsoft.ReactNative/packages.lock.json
index bd23518b301..0602b9ec3c3 100644
--- a/vnext/Microsoft.ReactNative/packages.lock.json
+++ b/vnext/Microsoft.ReactNative/packages.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
diff --git a/vnext/Microsoft.ReactNative/packages.newarch.experimentalwinui3.lock.json b/vnext/Microsoft.ReactNative/packages.newarch.experimentalwinui3.lock.json
index e6e852aff5c..e8c5fb90325 100644
--- a/vnext/Microsoft.ReactNative/packages.newarch.experimentalwinui3.lock.json
+++ b/vnext/Microsoft.ReactNative/packages.newarch.experimentalwinui3.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
diff --git a/vnext/Microsoft.ReactNative/packages.newarch.lock.json b/vnext/Microsoft.ReactNative/packages.newarch.lock.json
index 24cffe8d1be..6e383fda2c0 100644
--- a/vnext/Microsoft.ReactNative/packages.newarch.lock.json
+++ b/vnext/Microsoft.ReactNative/packages.newarch.lock.json
@@ -10,9 +10,9 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
- "requested": "[0.0.0-2505.2001-0e4bc3b9, )",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "requested": "[0.0.0-2511.7001-d7ca19b3, )",
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
diff --git a/vnext/PropertySheets/JSEngine.props b/vnext/PropertySheets/JSEngine.props
index a784057f813..a7fe1f085fa 100644
--- a/vnext/PropertySheets/JSEngine.props
+++ b/vnext/PropertySheets/JSEngine.props
@@ -6,7 +6,7 @@
true
- 0.0.0-2505.2001-0e4bc3b9
+ 0.0.0-2511.7001-d7ca19b3
$(PkgMicrosoft_JavaScript_Hermes)
$(NuGetPackageRoot)\Microsoft.JavaScript.Hermes\$(HermesVersion)
false
diff --git a/vnext/PropertySheets/React.Cpp.props b/vnext/PropertySheets/React.Cpp.props
index 1e17a731773..72808b4d59f 100644
--- a/vnext/PropertySheets/React.Cpp.props
+++ b/vnext/PropertySheets/React.Cpp.props
@@ -61,7 +61,7 @@
- USE_HERMES;%(PreprocessorDefinitions)
+ USE_HERMES;REACT_NATIVE_DEBUGGER_ENABLED;%(PreprocessorDefinitions)
ENABLE_DEVSERVER_HBCBUNDLES;%(PreprocessorDefinitions)
USE_V8;%(PreprocessorDefinitions)
USE_FABRIC;%(PreprocessorDefinitions)
@@ -136,7 +136,7 @@
$(CppStandard)
ProgramDatabase
- false
+ true
true
/utf-8 %(AdditionalOptions) /await
Guard
diff --git a/vnext/ReactCommon.UnitTests/packages.experimentalwinui3.lock.json b/vnext/ReactCommon.UnitTests/packages.experimentalwinui3.lock.json
index 83d625ce1fd..b2ac6286fe2 100644
--- a/vnext/ReactCommon.UnitTests/packages.experimentalwinui3.lock.json
+++ b/vnext/ReactCommon.UnitTests/packages.experimentalwinui3.lock.json
@@ -27,8 +27,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -91,7 +91,7 @@
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
"FollyWin32": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.Web.WebView2": "[1.0.2903.40, )",
"Microsoft.WindowsAppSDK": "[1.7.250127003-experimental3, )",
diff --git a/vnext/ReactCommon.UnitTests/packages.lock.json b/vnext/ReactCommon.UnitTests/packages.lock.json
index e2b3300fe1e..00a55c89947 100644
--- a/vnext/ReactCommon.UnitTests/packages.lock.json
+++ b/vnext/ReactCommon.UnitTests/packages.lock.json
@@ -27,8 +27,8 @@
},
"Microsoft.JavaScript.Hermes": {
"type": "Transitive",
- "resolved": "0.0.0-2505.2001-0e4bc3b9",
- "contentHash": "VNSUBgaGzJ/KkK3Br0b9FORkCgKqke54hi48vG42xRACIlxN+uLFMz0hRo+KHogz+Fsn+ltXicGwQsDVpmaCMg=="
+ "resolved": "0.0.0-2511.7001-d7ca19b3",
+ "contentHash": "/EGy/gbTWpFZPZ4Z81QxbGQxpZhqiOE3qrnSokZRgXAyHivl15s7zZkRLOy9daDmVyEfanq7YBCOMi0ha58uQA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -91,7 +91,7 @@
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
"FollyWin32": "[1.0.0, )",
- "Microsoft.JavaScript.Hermes": "[0.0.0-2505.2001-0e4bc3b9, )",
+ "Microsoft.JavaScript.Hermes": "[0.0.0-2511.7001-d7ca19b3, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.Web.WebView2": "[1.0.2903.40, )",
"Microsoft.WindowsAppSDK": "[1.7.250401001, )",
diff --git a/vnext/ReactCommon/ReactCommon.vcxproj b/vnext/ReactCommon/ReactCommon.vcxproj
index 6164251f380..cae2350e85f 100644
--- a/vnext/ReactCommon/ReactCommon.vcxproj
+++ b/vnext/ReactCommon/ReactCommon.vcxproj
@@ -114,6 +114,13 @@
+
+
+
+
+
+
+
@@ -144,10 +151,18 @@
+
+
+
+
+
+
+
+
-
+
@@ -194,6 +209,7 @@
+
@@ -289,4 +305,4 @@
-
\ No newline at end of file
+
diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp
deleted file mode 100644
index 31ec1f84144..00000000000
--- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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 "JSExecutor.h"
-
-#include "RAMBundleRegistry.h"
-
-#include
-#include
-#include
-#include
-
-#include
-
-namespace facebook::react {
-
-std::string JSExecutor::getSyntheticBundlePath(
- uint32_t bundleId,
- const std::string& bundlePath) {
- if (bundleId == RAMBundleRegistry::MAIN_BUNDLE_ID) {
- return bundlePath;
- }
- return folly::to("seg-", bundleId, ".js");
-}
-
-double JSExecutor::performanceNow() {
- return chronoToDOMHighResTimeStamp(std::chrono::steady_clock::now());
-}
-
-void JSExecutor::addConsoleMessage(jsi::Runtime& runtime, jsinspector_modern::ConsoleMessage message){
- return;
-}
-
-bool JSExecutor::supportsConsole() const {
- return false;
-}
-
-std::unique_ptr JSExecutor::captureStackTrace(
- facebook::jsi::Runtime &runtime,
- size_t framesToSkip) {
- return std::make_unique();
-}
-
-void JSExecutor::enableSamplingProfiler() {
- return; // [Windows TODO: stubbed implementation #14700]
-}
-
-void JSExecutor::disableSamplingProfiler() {
- return; // [Windows TODO: stubbed implementation #14700]
-}
-
-facebook::react::jsinspector_modern::tracing::RuntimeSamplingProfile JSExecutor::collectSamplingProfile() {
- return facebook::react::jsinspector_modern::tracing::RuntimeSamplingProfile(
- "stubbed_impl", {}); // [Windows TODO: stubbed implementation #14700]
-}
-
-std::unique_ptr
-JSExecutor::createAgentDelegate(
- jsinspector_modern::FrontendChannel frontendChannel,
- jsinspector_modern::SessionState& sessionState,
- std::unique_ptr,
- const jsinspector_modern::ExecutionContextDescription&
- executionContextDescription,
- RuntimeExecutor runtimeExecutor) {
- (void)executionContextDescription;
- (void)runtimeExecutor;
- return std::make_unique(
- std::move(frontendChannel), sessionState, getDescription());
-}
-
-} // namespace facebook::react
\ No newline at end of file
diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.h
deleted file mode 100644
index f044fca7cbf..00000000000
--- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * 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
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#ifndef RN_EXPORT
-#define RN_EXPORT __attribute__((visibility("default")))
-#endif
-
-namespace facebook::react {
-
-class JSBigString;
-class JSExecutor;
-class JSModulesUnbundle;
-class MessageQueueThread;
-class ModuleRegistry;
-class RAMBundleRegistry;
-
-// This interface describes the delegate interface required by
-// Executor implementations to call from JS into native code.
-class ExecutorDelegate {
- public:
- virtual ~ExecutorDelegate() {}
-
- virtual std::shared_ptr getModuleRegistry() = 0;
-
- virtual void callNativeModules(
- JSExecutor& executor,
- folly::dynamic&& calls,
- bool isEndOfBatch) = 0;
- virtual MethodCallResult callSerializableNativeHook(
- JSExecutor& executor,
- unsigned int moduleId,
- unsigned int methodId,
- folly::dynamic&& args) = 0;
-};
-
-class JSExecutorFactory {
- public:
- virtual std::unique_ptr createJSExecutor(
- std::shared_ptr delegate,
- std::shared_ptr jsQueue) = 0;
- virtual ~JSExecutorFactory() {}
-};
-
-class RN_EXPORT JSExecutor : public jsinspector_modern::RuntimeTargetDelegate {
- public:
- /**
- * Prepares the JS runtime for React Native by installing global variables.
- * Called once before any JS is evaluated.
- */
- virtual void initializeRuntime() = 0;
- /**
- * Execute an application script bundle in the JS context.
- */
- virtual void loadBundle(
- std::unique_ptr script,
- std::string sourceURL) = 0;
-
- /**
- * Add an application "RAM" bundle registry
- */
- virtual void setBundleRegistry(
- std::unique_ptr bundleRegistry) = 0;
-
- /**
- * Register a file path for an additional "RAM" bundle
- */
- virtual void registerBundle(
- uint32_t bundleId,
- const std::string& bundlePath) = 0;
-
- /**
- * Executes BatchedBridge.callFunctionReturnFlushedQueue with the module ID,
- * method ID and optional additional arguments in JS. The executor is
- * responsible for using Bridge->callNativeModules to invoke any necessary
- * native modules methods.
- */
- virtual void callFunction(
- const std::string& moduleId,
- const std::string& methodId,
- const folly::dynamic& arguments) = 0;
-
- /**
- * Executes BatchedBridge.invokeCallbackAndReturnFlushedQueue with the cbID,
- * and optional additional arguments in JS and returns the next queue. The
- * executor is responsible for using Bridge->callNativeModules to invoke any
- * necessary native modules methods.
- */
- virtual void invokeCallback(
- const double callbackId,
- const folly::dynamic& arguments) = 0;
-
- virtual void setGlobalVariable(
- std::string propName,
- std::unique_ptr jsonValue) = 0;
-
- virtual void* getJavaScriptContext() {
- return nullptr;
- }
-
- /**
- * Returns whether or not the underlying executor supports debugging via the
- * Chrome remote debugging protocol. If true, the executor should also
- * override the \c createAgentDelegate method.
- */
- virtual bool isInspectable() {
- return false;
- }
-
- /**
- * The description is displayed in the dev menu, if there is one in
- * this build. There is a default, but if this method returns a
- * non-empty string, it will be used instead.
- */
- virtual std::string getDescription() = 0;
-
- virtual void handleMemoryPressure([[maybe_unused]] int pressureLevel) {}
-
- virtual void destroy() {}
- virtual ~JSExecutor() override {}
-
- virtual void flush() {}
-
- static std::string getSyntheticBundlePath(
- uint32_t bundleId,
- const std::string& bundlePath);
-
- static double performanceNow();
-
- virtual void addConsoleMessage(jsi::Runtime& runtime, jsinspector_modern::ConsoleMessage message);
-
- virtual bool supportsConsole() const;
-
- /**
- * \returns an opaque representation of a stack trace. This may be passed back
- * to the `RuntimeTargetDelegate` as part of `addConsoleMessage` or other APIs
- * that report stack traces.
- * \param framesToSkip The number of call frames to skip. The first call frame
- * is the topmost (current) frame on the Runtime's call stack, which will
- * typically be the (native) JSI HostFunction that called this method.
- * \note The method is called on the JS thread, and receives a valid reference
- * to the current \c jsi::Runtime. The callee MAY use its own intrinsic
- * Runtime reference, if it has one, without checking it for equivalence with
- * the one provided here.
- */
- std::unique_ptr captureStackTrace(
- jsi::Runtime& runtime,
- size_t framesToSkip = 0) override;
-
-
- /**
- * Start sampling profiler.
- */
- virtual void enableSamplingProfiler() override;
-
- /**
- * Stop sampling profiler.
- */
- virtual void disableSamplingProfiler() override;
-
- /**
- * Return recorded sampling profile for the previous sampling session.
- */
- virtual facebook::react::jsinspector_modern::tracing::RuntimeSamplingProfile collectSamplingProfile() override;
-
- /**
- * Create a RuntimeAgentDelegate that can be used to debug the JS VM instance.
- */
- virtual std::unique_ptr
- createAgentDelegate(
- jsinspector_modern::FrontendChannel frontendChannel,
- jsinspector_modern::SessionState& sessionState,
- std::unique_ptr
- previouslyExportedState,
- const jsinspector_modern::ExecutionContextDescription&
- executionContextDescription,
- RuntimeExecutor runtimeExecutor) override;
-};
-
-} // namespace facebook::react
\ No newline at end of file
diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp
deleted file mode 100644
index bd8d8eef53f..00000000000
--- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * 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 "NativeToJsBridge.h"
-
-#include
-#include
-#include
-#include
-#include
-
-#include "ErrorUtils.h"
-#include "Instance.h"
-#include "JSBigString.h"
-#include "MessageQueueThread.h"
-#include "MethodCall.h"
-#include "ModuleRegistry.h"
-#include "MoveWrapper.h"
-#include "RAMBundleRegistry.h"
-#include "TraceSection.h"
-
-#include
-
-#ifdef WITH_FBSYSTRACE
-#include
-
-using fbsystrace::FbSystraceAsyncFlow;
-#endif
-
-namespace facebook::react {
-
-// This class manages calls from JS to native code.
-class JsToNativeBridge : public react::ExecutorDelegate {
- public:
- JsToNativeBridge(
- std::shared_ptr registry,
- std::shared_ptr callback)
- : m_registry(registry), m_callback(callback) {}
-
- std::shared_ptr getModuleRegistry() override {
- return m_registry;
- }
-
- bool isBatchActive() {
- return m_batchHadNativeModuleOrTurboModuleCalls;
- }
-
- void callNativeModules(
- [[maybe_unused]] JSExecutor& executor,
- folly::dynamic&& calls,
- bool isEndOfBatch) override {
- CHECK(m_registry || calls.empty())
- << "native module calls cannot be completed with no native modules";
- m_batchHadNativeModuleOrTurboModuleCalls =
- m_batchHadNativeModuleOrTurboModuleCalls || !calls.empty();
-
- std::vector methodCalls = parseMethodCalls(std::move(calls));
- BridgeNativeModulePerfLogger::asyncMethodCallBatchPreprocessEnd(
- (int)methodCalls.size());
-
- // An exception anywhere in here stops processing of the batch. This
- // was the behavior of the Android bridge, and since exception handling
- // terminates the whole bridge, there's not much point in continuing.
- for (auto& call : methodCalls) {
- m_registry->callNativeMethod(
- call.moduleId, call.methodId, std::move(call.arguments), call.callId);
- }
- if (isEndOfBatch) {
- // onBatchComplete will be called on the native (module) queue, but
- // decrementPendingJSCalls will be called sync. Be aware that the bridge
- // may still be processing native calls when the bridge idle signaler
- // fires.
- if (m_batchHadNativeModuleOrTurboModuleCalls) {
- m_callback->onBatchComplete();
- m_batchHadNativeModuleOrTurboModuleCalls = false;
- }
- m_callback->decrementPendingJSCalls();
- }
- }
-
- MethodCallResult callSerializableNativeHook(
- [[maybe_unused]] JSExecutor& executor,
- unsigned int moduleId,
- unsigned int methodId,
- folly::dynamic&& args) override {
- return m_registry->callSerializableNativeHook(
- moduleId, methodId, std::move(args));
- }
-
- void recordTurboModuleAsyncMethodCall() noexcept {
- m_batchHadNativeModuleOrTurboModuleCalls = true;
- }
-
- private:
- // These methods are always invoked from an Executor. The NativeToJsBridge
- // keeps a reference to the executor, and when destroy() is called, the
- // executor is destroyed synchronously on its queue.
- std::shared_ptr m_registry;
- std::shared_ptr m_callback;
- std::atomic m_batchHadNativeModuleOrTurboModuleCalls{false};
-};
-
-NativeToJsBridge::NativeToJsBridge(
- JSExecutorFactory* jsExecutorFactory,
- std::shared_ptr registry,
- std::shared_ptr jsQueue,
- std::shared_ptr callback)
- : m_destroyed(std::make_shared(false)),
- m_delegate(std::make_shared(registry, callback)),
- m_executor(jsExecutorFactory->createJSExecutor(m_delegate, jsQueue)),
- m_executorMessageQueueThread(std::move(jsQueue)),
- m_inspectable(m_executor->isInspectable()) {}
-
-// This must be called on the same thread on which the constructor was called.
-NativeToJsBridge::~NativeToJsBridge() {
- CHECK(*m_destroyed)
- << "NativeToJsBridge::destroy() must be called before deallocating the NativeToJsBridge!";
-}
-
-void NativeToJsBridge::initializeRuntime() {
- runOnExecutorQueue(
- [](JSExecutor* executor) mutable { executor->initializeRuntime(); });
-}
-
-void NativeToJsBridge::loadBundle(
- std::unique_ptr bundleRegistry,
- std::unique_ptr startupScript,
- std::string startupScriptSourceURL) {
- runOnExecutorQueue(
- [this,
- bundleRegistryWrap = makeMoveWrapper(std::move(bundleRegistry)),
- startupScript = makeMoveWrapper(std::move(startupScript)),
- startupScriptSourceURL =
- std::move(startupScriptSourceURL)](JSExecutor* executor) mutable {
- auto bundleRegistry = bundleRegistryWrap.move();
- if (bundleRegistry) {
- executor->setBundleRegistry(std::move(bundleRegistry));
- }
- try {
- executor->loadBundle(
- std::move(*startupScript), std::move(startupScriptSourceURL));
- } catch (...) {
- m_applicationScriptHasFailure = true;
- throw;
- }
- });
-}
-
-void NativeToJsBridge::loadBundleSync(
- std::unique_ptr bundleRegistry,
- std::unique_ptr startupScript,
- std::string startupScriptSourceURL) {
- if (bundleRegistry) {
- m_executor->setBundleRegistry(std::move(bundleRegistry));
- }
- try {
- m_executor->loadBundle(
- std::move(startupScript), std::move(startupScriptSourceURL));
- } catch (...) {
- m_applicationScriptHasFailure = true;
- throw;
- }
-}
-
-void NativeToJsBridge::callFunction(
- std::string&& module,
- std::string&& method,
- folly::dynamic&& arguments) {
- int systraceCookie = -1;
-#ifdef WITH_FBSYSTRACE
- systraceCookie = m_systraceCookie++;
- FbSystraceAsyncFlow::begin(
- TRACE_TAG_REACT_CXX_BRIDGE, "JSCall", systraceCookie);
-#endif
-
- runOnExecutorQueue([this,
- module = std::move(module),
- method = std::move(method),
- arguments = std::move(arguments),
- systraceCookie](JSExecutor* executor) {
- if (m_applicationScriptHasFailure) {
- LOG(ERROR)
- << "Attempting to call JS function on a bad application bundle: "
- << module.c_str() << "." << method.c_str() << "()";
- throw std::runtime_error(
- "Attempting to call JS function on a bad application bundle: " +
- module + "." + method + "()");
- }
-
-#ifdef WITH_FBSYSTRACE
- FbSystraceAsyncFlow::end(
- TRACE_TAG_REACT_CXX_BRIDGE, "JSCall", systraceCookie);
- TraceSection s(
- "NativeToJsBridge::callFunction", "module", module, "method", method);
-#else
- (void)(systraceCookie);
-#endif
- // This is safe because we are running on the executor's thread: it won't
- // destruct until after it's been unregistered (which we check above) and
- // that will happen on this thread
- executor->callFunction(module, method, arguments);
- });
-}
-
-void NativeToJsBridge::invokeCallback(
- double callbackId,
- folly::dynamic&& arguments) {
- int systraceCookie = -1;
-#ifdef WITH_FBSYSTRACE
- systraceCookie = m_systraceCookie++;
- FbSystraceAsyncFlow::begin(
- TRACE_TAG_REACT_CXX_BRIDGE, "", systraceCookie);
-#endif
-
- runOnExecutorQueue(
- [this, callbackId, arguments = std::move(arguments), systraceCookie](
- JSExecutor* executor) {
- if (m_applicationScriptHasFailure) {
- LOG(ERROR)
- << "Attempting to call JS callback on a bad application bundle: "
- << callbackId;
- throw std::runtime_error(
- "Attempting to invoke JS callback on a bad application bundle.");
- }
-#ifdef WITH_FBSYSTRACE
- FbSystraceAsyncFlow::end(
- TRACE_TAG_REACT_CXX_BRIDGE, "", systraceCookie);
- TraceSection s("NativeToJsBridge::invokeCallback");
-#else
- (void)(systraceCookie);
-#endif
- executor->invokeCallback(callbackId, arguments);
- });
-}
-
-void NativeToJsBridge::registerBundle(
- uint32_t bundleId,
- const std::string& bundlePath) {
- runOnExecutorQueue([bundleId, bundlePath](JSExecutor* executor) {
- executor->registerBundle(bundleId, bundlePath);
- });
-}
-
-void NativeToJsBridge::setGlobalVariable(
- std::string propName,
- std::unique_ptr jsonValue) {
- runOnExecutorQueue([propName = std::move(propName),
- jsonValue = makeMoveWrapper(std::move(jsonValue))](
- JSExecutor* executor) mutable {
- executor->setGlobalVariable(propName, jsonValue.move());
- });
-}
-
-void* NativeToJsBridge::getJavaScriptContext() {
- // TODO(cjhopman): this seems unsafe unless we require that it is only called
- // on the main js queue.
- return m_executor->getJavaScriptContext();
-}
-
-bool NativeToJsBridge::isInspectable() {
- return m_inspectable;
-}
-
-bool NativeToJsBridge::isBatchActive() {
- return m_delegate->isBatchActive();
-}
-
-void NativeToJsBridge::handleMemoryPressure(int pressureLevel) {
- runOnExecutorQueue([=](JSExecutor* executor) {
- executor->handleMemoryPressure(pressureLevel);
- });
-}
-
-void NativeToJsBridge::destroy() {
- // All calls made through runOnExecutorQueue have an early exit if
- // m_destroyed is true. Setting this before the runOnQueueSync will cause
- // pending work to be cancelled and we won't have to wait for it.
- *m_destroyed = true;
- m_executorMessageQueueThread->runOnQueueSync([this] {
- m_executor->destroy();
- m_executorMessageQueueThread->quitSynchronous();
- m_executor = nullptr;
- });
-}
-
-void NativeToJsBridge::runOnExecutorQueue(
- std::function&& task) noexcept {
- if (*m_destroyed) {
- return;
- }
-
- std::shared_ptr isDestroyed = m_destroyed;
- m_executorMessageQueueThread->runOnQueue(
- [this, isDestroyed, task = std::move(task)] {
- if (*isDestroyed) {
- return;
- }
-
- // The executor is guaranteed to be valid for the duration of the task
- // because:
- // 1. the executor is only destroyed after it is unregistered
- // 2. the executor is unregistered on this queue
- // 3. we just confirmed that the executor hasn't been unregistered above
- task(m_executor.get());
- });
-}
-
-std::shared_ptr
-NativeToJsBridge::getDecoratedNativeMethodCallInvoker(
- std::shared_ptr nativeMethodCallInvoker) const {
- class NativeMethodCallInvokerImpl : public NativeMethodCallInvoker {
- private:
- std::weak_ptr m_jsToNativeBridge;
- std::shared_ptr m_nativeInvoker;
-
- public:
- NativeMethodCallInvokerImpl(
- std::weak_ptr jsToNativeBridge,
- std::shared_ptr nativeInvoker)
- : m_jsToNativeBridge(std::move(jsToNativeBridge)),
- m_nativeInvoker(std::move(nativeInvoker)) {}
-
- void invokeAsync(
- const std::string& methodName,
- NativeMethodCallFunc&& func) noexcept override {
- if (auto strongJsToNativeBridge = m_jsToNativeBridge.lock()) {
- strongJsToNativeBridge->recordTurboModuleAsyncMethodCall();
- }
- m_nativeInvoker->invokeAsync(methodName, std::move(func));
- }
-
- void invokeSync(const std::string& methodName, NativeMethodCallFunc&& func)
- override {
- m_nativeInvoker->invokeSync(methodName, std::move(func));
- }
- };
-
- return std::make_shared(
- m_delegate, std::move(nativeMethodCallInvoker));
-}
-
-jsinspector_modern::RuntimeTargetDelegate&
-NativeToJsBridge::getInspectorTargetDelegate() {
- return *m_executor;
-}
-
-} // namespace facebook::react
\ No newline at end of file
diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jserrorhandler/JsErrorHandler.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jserrorhandler/JsErrorHandler.cpp
deleted file mode 100644
index fc5ff6cfabc..00000000000
--- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jserrorhandler/JsErrorHandler.cpp
+++ /dev/null
@@ -1,429 +0,0 @@
-/*
- * 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 "JsErrorHandler.h"
-#include
-#include
-#include
-#include
-#include
-#include "StackTraceParser.h"
-
-using namespace facebook;
-
-namespace {
-std::string quote(const std::string& view) {
- return "\"" + view + "\"";
-}
-
-int nextExceptionId() {
- static int exceptionId = 0;
- return exceptionId++;
-}
-
-bool isLooselyNull(const jsi::Value& value) {
- return value.isNull() || value.isUndefined();
-}
-
-bool isEqualTo(
- jsi::Runtime& runtime,
- const jsi::Value& value,
- const std::string& str) {
- return jsi::Value::strictEquals(
- runtime, value, jsi::String::createFromUtf8(runtime, str));
-}
-
-std::string stringifyToCpp(jsi::Runtime& runtime, const jsi::Value& value) {
- return value.toString(runtime).utf8(runtime);
-}
-
-bool isTruthy(jsi::Runtime& runtime, const jsi::Value& value) {
- auto Boolean = runtime.global().getPropertyAsFunction(runtime, "Boolean");
- return Boolean.call(runtime, value).getBool();
-}
-
-void objectAssign(
- jsi::Runtime& runtime,
- jsi::Object& target,
- const jsi::Object& value) {
- auto Object = runtime.global().getPropertyAsObject(runtime, "Object");
- auto assign = Object.getPropertyAsFunction(runtime, "assign");
- assign.callWithThis(runtime, Object, target, value);
-}
-
-jsi::Object wrapInErrorIfNecessary(
- jsi::Runtime& runtime,
- const jsi::Value& value) {
- auto Error = runtime.global().getPropertyAsFunction(runtime, "Error");
- auto isError =
- value.isObject() && value.asObject(runtime).instanceOf(runtime, Error);
- auto error = isError
- ? value.getObject(runtime)
- : Error.callAsConstructor(runtime, value).getObject(runtime);
- return error;
-}
-
-class SetFalseOnDestruct {
- std::shared_ptr _value;
-
- public:
- SetFalseOnDestruct(const SetFalseOnDestruct&) = delete;
- SetFalseOnDestruct& operator=(const SetFalseOnDestruct&) = delete;
- SetFalseOnDestruct(SetFalseOnDestruct&&) = delete;
- SetFalseOnDestruct& operator=(SetFalseOnDestruct&&) = delete;
- explicit SetFalseOnDestruct(std::shared_ptr value)
- : _value(std::move(value)) {}
- ~SetFalseOnDestruct() {
- *_value = false;
- }
-};
-
-void logErrorWhileReporting(
- std::string message,
- jsi::JSError& error,
- jsi::JSError& originalError) {
- LOG(ERROR) << "JsErrorHandler::" << message << std::endl
- << "Js error message: " << error.getMessage() << std::endl
- << "Original js error message: " << originalError.getMessage()
- << std::endl;
-}
-
-jsi::Value getBundleMetadata(jsi::Runtime& runtime, jsi::JSError& error) {
- auto jsGetBundleMetadataValue =
- runtime.global().getProperty(runtime, "__getBundleMetadata");
-
- if (!jsGetBundleMetadataValue.isObject() ||
- !jsGetBundleMetadataValue.asObject(runtime).isFunction(runtime)) {
- return jsi::Value::null();
- }
-
- auto jsGetBundleMetadataValueFn =
- jsGetBundleMetadataValue.asObject(runtime).asFunction(runtime);
-
- try {
- auto bundleMetadataValue = jsGetBundleMetadataValueFn.call(runtime);
- if (bundleMetadataValue.isObject()) {
- return bundleMetadataValue;
- }
- return bundleMetadataValue;
- } catch (jsi::JSError& ex) {
- logErrorWhileReporting(
- "getBundleMetadata(): Error raised while calling __getBundleMetadata(). Returning null.",
- ex,
- error);
- }
-
- return jsi::Value::null();
-}
-} // namespace
-
-namespace facebook::react {
-
-template <>
-struct Bridging {
- static jsi::Value toJs(
- jsi::Runtime& runtime,
- const JsErrorHandler::ProcessedError::StackFrame& frame) {
- auto stackFrame = jsi::Object(runtime);
- auto file = bridging::toJs(runtime, frame.file, nullptr);
- auto lineNumber = bridging::toJs(runtime, frame.lineNumber, nullptr);
- auto column = bridging::toJs(runtime, frame.column, nullptr);
-
- stackFrame.setProperty(runtime, "file", file);
- stackFrame.setProperty(runtime, "methodName", frame.methodName);
- stackFrame.setProperty(runtime, "lineNumber", lineNumber);
- stackFrame.setProperty(runtime, "column", column);
- return stackFrame;
- }
-};
-
-template <>
-struct Bridging {
- static jsi::Value toJs(
- jsi::Runtime& runtime,
- const JsErrorHandler::ProcessedError& error) {
- auto data = jsi::Object(runtime);
- data.setProperty(runtime, "message", error.message);
- data.setProperty(
- runtime,
- "originalMessage",
- bridging::toJs(runtime, error.originalMessage, nullptr));
- data.setProperty(
- runtime, "name", bridging::toJs(runtime, error.name, nullptr));
- data.setProperty(
- runtime,
- "componentStack",
- bridging::toJs(runtime, error.componentStack, nullptr));
-
- auto stack = jsi::Array(runtime, error.stack.size());
- for (size_t i = 0; i < error.stack.size(); i++) {
- auto& frame = error.stack[i];
- stack.setValueAtIndex(runtime, i, bridging::toJs(runtime, frame));
- }
-
- data.setProperty(runtime, "stack", stack);
- data.setProperty(runtime, "id", error.id);
- data.setProperty(runtime, "isFatal", error.isFatal);
- data.setProperty(runtime, "extraData", error.extraData);
- return data;
- }
-};
-
-std::ostream& operator<<(
- std::ostream& os,
- const JsErrorHandler::ProcessedError::StackFrame& frame) {
- auto file = frame.file ? quote(*frame.file) : "nil";
- auto methodName = quote(frame.methodName);
- auto lineNumber =
- frame.lineNumber ? std::to_string(*frame.lineNumber) : "nil";
- auto column = frame.column ? std::to_string(*frame.column) : "nil";
-
- os << "StackFrame { .file = " << file << ", .methodName = " << methodName
- << ", .lineNumber = " << lineNumber << ", .column = " << column << " }";
- return os;
-}
-std::ostream& operator<<(
- std::ostream& os,
- const JsErrorHandler::ProcessedError& error) {
- auto message = quote(error.message);
- auto originalMessage =
- error.originalMessage ? quote(*error.originalMessage) : "nil";
- auto name = error.name ? quote(*error.name) : "nil";
- auto componentStack =
- error.componentStack ? quote(*error.componentStack) : "nil";
- auto id = std::to_string(error.id);
- auto isFatal = std::to_string(static_cast(error.isFatal));
- auto extraData = "jsi::Object{ } ";
-
- os << "ProcessedError {\n"
- << " .message = " << message << "\n"
- << " .originalMessage = " << originalMessage << "\n"
- << " .name = " << name << "\n"
- << " .componentStack = " << componentStack << "\n"
- << " .stack = [\n";
-
- for (const auto& frame : error.stack) {
- os << " " << frame << ", \n";
- }
- os << " ]\n"
- << " .id = " << id << "\n"
- << " .isFatal " << isFatal << "\n"
- << " .extraData = " << extraData << "\n"
- << "}";
- return os;
-}
-
-JsErrorHandler::JsErrorHandler(JsErrorHandler::OnJsError onJsError)
- : _onJsError(std::move(onJsError)),
- _inErrorHandler(std::make_shared(false)){
-
- };
-
-JsErrorHandler::~JsErrorHandler() {}
-
-void JsErrorHandler::handleError(
- jsi::Runtime& runtime,
- jsi::JSError& error,
- bool isFatal,
- bool logToConsole) {
- // TODO: Current error parsing works and is stable. Can investigate using
- // REGEX_HERMES to get additional Hermes data, though it requires JS setup
-
- if (!ReactNativeFeatureFlags::useAlwaysAvailableJSErrorHandling() &&
- _isRuntimeReady) {
- try {
- handleJSError(runtime, error, isFatal);
- return;
- } catch (jsi::JSError& ex) {
- logErrorWhileReporting(
- "handleError(): Error raised while reporting using js pipeline. Using c++ pipeline instead.",
- ex,
- error);
-
- // Re-try reporting using the c++ pipeline
- _hasHandledFatalError = false;
- }
- }
-
- handleErrorWithCppPipeline(runtime, error, isFatal, logToConsole);
-}
-
-void JsErrorHandler::handleErrorWithCppPipeline(
- jsi::Runtime& runtime,
- jsi::JSError& error,
- bool isFatal,
- bool logToConsole) {
- *_inErrorHandler = true;
- SetFalseOnDestruct temp{_inErrorHandler};
-
- auto message = error.getMessage();
- auto errorObj = wrapInErrorIfNecessary(runtime, error.value());
- auto componentStackValue = errorObj.getProperty(runtime, "componentStack");
- if (!isLooselyNull(componentStackValue)) {
- message += "\n" + stringifyToCpp(runtime, componentStackValue);
- }
-
- auto nameValue = errorObj.getProperty(runtime, "name");
- auto name = (isLooselyNull(nameValue) || isEqualTo(runtime, nameValue, ""))
- ? std::nullopt
- : std::optional(stringifyToCpp(runtime, nameValue));
-
- if (name && !message.starts_with(*name + ": ")) {
- message = *name + ": " + message;
- }
-
- auto jsEngineValue = errorObj.getProperty(runtime, "jsEngine");
-
- if (!isLooselyNull(jsEngineValue)) {
- message += ", js engine: " + stringifyToCpp(runtime, jsEngineValue);
- }
-
- auto extraDataKey = jsi::PropNameID::forUtf8(runtime, "RN$ErrorExtraDataKey");
- auto extraDataValue = errorObj.getProperty(runtime, extraDataKey);
-
- auto extraData = jsi::Object(runtime);
- if (extraDataValue.isObject()) {
- objectAssign(runtime, extraData, extraDataValue.asObject(runtime));
- }
-
- auto isDEV =
- isTruthy(runtime, runtime.global().getProperty(runtime, "__DEV__"));
-
- extraData.setProperty(runtime, "jsEngine", jsEngineValue);
- extraData.setProperty(runtime, "rawStack", error.getStack());
- extraData.setProperty(runtime, "__DEV__", isDEV);
- extraData.setProperty(
- runtime, "bundleMetadata", getBundleMetadata(runtime, error));
-
- auto cause = errorObj.getProperty(runtime, "cause");
- if (cause.isObject()) {
- auto causeObj = cause.asObject(runtime);
- // TODO: Consider just forwarding all properties. For now, just forward the
- // stack properties to maintain symmetry with js pipeline
- auto stackSymbols = causeObj.getProperty(runtime, "stackSymbols");
- extraData.setProperty(runtime, "stackSymbols", stackSymbols);
-
- auto stackReturnAddresses =
- causeObj.getProperty(runtime, "stackReturnAddresses");
- extraData.setProperty(
- runtime, "stackReturnAddresses", stackReturnAddresses);
-
- auto stackElements = causeObj.getProperty(runtime, "stackElements");
- extraData.setProperty(runtime, "stackElements", stackElements);
- }
-
- auto originalMessage = message == error.getMessage()
- ? std::nullopt
- : std::optional(error.getMessage());
-
- auto componentStack = !componentStackValue.isString()
- ? std::nullopt
- : std::optional(componentStackValue.asString(runtime).utf8(runtime));
-
- auto isHermes = runtime.global().hasProperty(runtime, "HermesInternal");
- auto stackFrames = StackTraceParser::parse(isHermes, error.getStack());
-
- auto id = nextExceptionId();
-
- ProcessedError processedError = {
- .message =
- _isRuntimeReady ? message : ("[runtime not ready]: " + message),
- .originalMessage = originalMessage,
- .name = name,
- .componentStack = componentStack,
- .stack = stackFrames,
- .id = id,
- .isFatal = isFatal,
- .extraData = std::move(extraData),
- };
-
- auto data = bridging::toJs(runtime, processedError).asObject(runtime);
-
- auto isComponentError =
- isTruthy(runtime, errorObj.getProperty(runtime, "isComponentError"));
- data.setProperty(runtime, "isComponentError", isComponentError);
-
- if (logToConsole && runtime.global().hasProperty(runtime, "console")) { // [Windows] Added hasProperty check
- auto console = runtime.global().getPropertyAsObject(runtime, "console");
- auto errorFn = console.getPropertyAsFunction(runtime, "error");
- auto finalMessage =
- jsi::String::createFromUtf8(runtime, processedError.message);
- errorFn.callWithThis(runtime, console, finalMessage);
- }
-
- std::shared_ptr shouldPreventDefault = std::make_shared(false);
- auto preventDefault = jsi::Function::createFromHostFunction(
- runtime,
- jsi::PropNameID::forAscii(runtime, "preventDefault"),
- 0,
- [shouldPreventDefault](
- jsi::Runtime& /*rt*/,
- const jsi::Value& /*thisVal*/,
- const jsi::Value* /*args*/,
- size_t /*count*/) {
- *shouldPreventDefault = true;
- return jsi::Value::undefined();
- });
-
- data.setProperty(runtime, "preventDefault", preventDefault);
-
- for (auto& errorListener : _errorListeners) {
- try {
- errorListener(runtime, jsi::Value(runtime, data));
- } catch (jsi::JSError& ex) {
- logErrorWhileReporting(
- "handleErrorWithCppPipeline(): Error raised inside an error listener. Executing next listener.",
- ex,
- error);
- }
- }
-
- if (*shouldPreventDefault) {
- return;
- }
-
- auto errorType = errorObj.getProperty(runtime, "type");
- auto isWarn = isEqualTo(runtime, errorType, "warn");
-
- if (isFatal || !isWarn) {
- if (isFatal) {
- if (_hasHandledFatalError) {
- return;
- }
- _hasHandledFatalError = true;
- }
-
- _onJsError(runtime, processedError);
- }
-}
-
-void JsErrorHandler::registerErrorListener(
- const std::function& errorListener) {
- _errorListeners.push_back(errorListener);
-}
-
-bool JsErrorHandler::hasHandledFatalError() {
- return _hasHandledFatalError;
-}
-
-void JsErrorHandler::setRuntimeReady() {
- _isRuntimeReady = true;
-}
-
-bool JsErrorHandler::isRuntimeReady() {
- return _isRuntimeReady;
-}
-
-void JsErrorHandler::notifyOfFatalError() {
- _hasHandledFatalError = true;
-}
-
-bool JsErrorHandler::inErrorHandler() {
- return *_inErrorHandler;
-}
-
-} // namespace facebook::react
diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp
index f3a2cfa63dc..8a49c9229ed 100644
--- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp
+++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp
@@ -1173,7 +1173,7 @@ TEST_P(JSITest, DecoratorTest) {
class CountRuntime final : public WithRuntimeDecorator {
public:
- explicit CountRuntime(std::unique_ptr rt)
+ explicit CountRuntime(std::shared_ptr rt)
: WithRuntimeDecorator(*rt, count_),
rt_(std::move(rt)),
count_(kInit) {}
@@ -1183,7 +1183,7 @@ TEST_P(JSITest, DecoratorTest) {
}
private:
- std::unique_ptr rt_;
+ std::shared_ptr rt_;
Count count_;
};
@@ -1222,7 +1222,7 @@ TEST_P(JSITest, MultiDecoratorTest) {
class MultiRuntime final
: public WithRuntimeDecorator> {
public:
- explicit MultiRuntime(std::unique_ptr rt)
+ explicit MultiRuntime(std::shared_ptr rt)
: WithRuntimeDecorator