Skip to content

Commit a2b2dcb

Browse files
huntiefacebook-github-bot
authored andcommitted
Restore inspector addPage listener callback
Summary: Accidentally clobbered in D93247603. This affects the `fuseboxAssertSingleHostState` feature (react/react-native-devtools-frontend#218). Changelog: [Internal] Differential Revision: D95365621
1 parent a7ad793 commit a2b2dcb

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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)