Restore inspector addPage listener callback (#55925)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55925

Accidentally clobbered in D93247603. This affects the `fuseboxAssertSingleHostState` feature (https://github.com/facebook/react-native-devtools-frontend/pull/218).

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D95365621

fbshipit-source-id: 0df7f7bb33bb6bf6eabe15c8ee06c1761567c84b
This commit is contained in:
Alex Hunt authored and Alan Lee committed 2026-03-08 23:57:46 -07:00
1 parent 2750e6038d
commit 2394ead58b
1 file changed
+6
@@ -142,6 +142,12 @@ int InspectorImpl::addPage(
pageId,
Page{pageId, description, vm, std::move(connectFunc), capabilities});
for (const auto& listenerWeak : listeners_) {
if (auto listener = listenerWeak.lock()) {
listener->unstable_onHostTargetAdded();
}
}
return pageId;
}