Skip to content

Commit 0622dea

Browse files
committed
Restore inspector addPage listener callback (react#55925)
Summary: Pull Request resolved: react#55925 Accidentally clobbered in D93247603. This affects the `fuseboxAssertSingleHostState` feature (react/react-native-devtools-frontend#218). Changelog: [Internal] Reviewed By: vzaidman Differential Revision: D95365621 fbshipit-source-id: 0df7f7bb33bb6bf6eabe15c8ee06c1761567c84b
1 parent 5d1e15c commit 0622dea

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

packages/react-native/ReactCommon/jsinspector-modern/InspectorInterfaces.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,9 @@ int InspectorImpl::addPage(
143143
pageId,
144144
Page{pageId, description, vm, std::move(connectFunc), capabilities});
145145

146-
// Strong assumption: If prefersFuseboxFrontend is set, the page added is a
147-
// HostTarget and not a legacy Hermes runtime target.
148-
if (capabilities.prefersFuseboxFrontend) {
149-
for (const auto& listenerWeak : listeners_) {
150-
if (auto listener = listenerWeak.lock()) {
151-
listener->unstable_onHostTargetAdded();
152-
}
146+
for (const auto& listenerWeak : listeners_) {
147+
if (auto listener = listenerWeak.lock()) {
148+
listener->unstable_onHostTargetAdded();
153149
}
154150
}
155151

0 commit comments

Comments
 (0)