Skip to content

Commit 421de23

Browse files
huntiemeta-codesync[bot]
authored andcommitted
Remove prefersFuseboxFrontend capability flag (#55550)
Summary: Pull Request resolved: #55550 **Context** Clean up the legacy `rn_inspector.html` entry point. React Native DevTools has been the default since 0.76, and we have now removed all internal dependencies at Meta. We've verified that Reanimated (`react-native-worklets`) also do not depend on this workflow, and documents `chrome://inspect` instead. **This diff** - Remove the `prefersFuseboxFrontend` capability flag from device pages. Changelog: [General][Changed] - **React Native DevTools**: Page targets returned from `/json/list` will no longer set `prefersFuseboxFrontend` Reviewed By: vzaidman Differential Revision: D93247603 fbshipit-source-id: 4a4cb06476d3e44c3124d0b5a5d942b6880a561a
1 parent 8250db6 commit 421de23

6 files changed

Lines changed: 5 additions & 17 deletions

File tree

packages/react-native/React/Base/RCTBridge.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ - (void)setUp
583583
}
584584
return strongSelf->_inspectorTarget->connect(std::move(remote));
585585
},
586-
{.nativePageReloads = true, .prefersFuseboxFrontend = true});
586+
{.nativePageReloads = true});
587587
}
588588

589589
Class bridgeClass = self.bridgeClass;

packages/react-native/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ JReactHostInspectorTarget::JReactHostInspectorTarget(
4848
// Reject the connection.
4949
return nullptr;
5050
},
51-
{.nativePageReloads = true, .prefersFuseboxFrontend = true});
51+
{.nativePageReloads = true});
5252
}
5353
}
5454

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ folly::dynamic targetCapabilitiesToDynamic(
2929
const InspectorTargetCapabilities& capabilities) {
3030
return folly::dynamic::object(
3131
"nativePageReloads", capabilities.nativePageReloads)(
32-
"nativeSourceCodeFetching", capabilities.nativeSourceCodeFetching)(
33-
"prefersFuseboxFrontend", capabilities.prefersFuseboxFrontend);
32+
"nativeSourceCodeFetching", capabilities.nativeSourceCodeFetching);
3433
}
3534

3635
namespace {
@@ -143,16 +142,6 @@ int InspectorImpl::addPage(
143142
pageId,
144143
Page{pageId, description, vm, std::move(connectFunc), capabilities});
145144

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-
}
153-
}
154-
}
155-
156145
return pageId;
157146
}
158147

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class IDestructible {
3636
struct InspectorTargetCapabilities {
3737
bool nativePageReloads = false;
3838
bool nativeSourceCodeFetching = false;
39-
bool prefersFuseboxFrontend = false;
4039
};
4140

4241
folly::dynamic targetCapabilitiesToDynamic(const InspectorTargetCapabilities &capabilities);

packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ - (void)start
255255
}
256256
return strongSelf->_inspectorTarget->connect(std::move(remote));
257257
},
258-
{.nativePageReloads = true, .prefersFuseboxFrontend = true});
258+
{.nativePageReloads = true});
259259
}
260260
if (_instance) {
261261
RCTLogWarn(

packages/react-native/ReactCxxPlatform/react/devsupport/inspector/Inspector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void Inspector::ensureHostTarget(
180180
});
181181
static_cast<InspectorHostTargetDelegate&>(*hostDelegate_).setTarget(target_);
182182
jsinspector_modern::InspectorTargetCapabilities capabilities{
183-
.nativePageReloads = true, .prefersFuseboxFrontend = true};
183+
.nativePageReloads = true};
184184
pageId_ = jsinspector_modern::getInspectorInstance().addPage(
185185
std::string(INTEGRATION_NAME),
186186
"", /*vm*/

0 commit comments

Comments
 (0)