Skip to content

Commit 2394ead

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

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ int InspectorImpl::addPage(
142142
pageId,
143143
Page{pageId, description, vm, std::move(connectFunc), capabilities});
144144

145+
for (const auto& listenerWeak : listeners_) {
146+
if (auto listener = listenerWeak.lock()) {
147+
listener->unstable_onHostTargetAdded();
148+
}
149+
}
150+
145151
return pageId;
146152
}
147153

0 commit comments

Comments
 (0)