Set nativeSourceCodeFetching capability in jsinspector-modern targets (#45850)

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

Enables the `nativeSourceCodeFetching` capability flag for the modern debugger stack on both Android and iOS. This disables source code fetching hacks within the Inspector Proxy layer and instead enables the debugger server to handle all source code fetching directly on the device.

Changelog: [Internal]

Differential Revision: D60236216

fbshipit-source-id: 1239b4d7d2233852f007114721b202d90459fa06
This commit is contained in:
Alex Hunt
2024-08-07 09:08:28 -07:00
committed by Facebook GitHub Bot
parent db3069b7ca
commit 7c49df9d08
5 changed files with 9 additions and 5 deletions
@@ -483,7 +483,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
}
return strongSelf->_inspectorTarget->connect(std::move(remote));
},
{.nativePageReloads = true, .prefersFuseboxFrontend = true});
{.nativePageReloads = true, .nativeSourceCodeFetching = true, .prefersFuseboxFrontend = true});
}
Class bridgeClass = self.bridgeClass;
@@ -36,7 +36,7 @@ public class InspectorNetworkHelper {
return;
}
// TODO(T180434718): Assign cancel function to listener
// TODO(T196951523): Assign cancel function to listener
Call call = client.newCall(request);
call.enqueue(
@@ -79,7 +79,9 @@ ReactInstanceManagerInspectorTarget::ReactInstanceManagerInspectorTarget(
-> std::unique_ptr<ILocalConnection> {
return inspectorTarget->connect(std::move(remote));
},
{.nativePageReloads = true, .prefersFuseboxFrontend = true});
{.nativePageReloads = true,
.nativeSourceCodeFetching = true,
.prefersFuseboxFrontend = true});
}
}
@@ -44,7 +44,9 @@ JReactHostInspectorTarget::JReactHostInspectorTarget(
// Reject the connection.
return nullptr;
},
{.nativePageReloads = true, .prefersFuseboxFrontend = true});
{.nativePageReloads = true,
.nativeSourceCodeFetching = true,
.prefersFuseboxFrontend = true});
}
}
@@ -227,7 +227,7 @@ class RCTHostHostTargetDelegate : public facebook::react::jsinspector_modern::Ho
}
return strongSelf->_inspectorTarget->connect(std::move(remote));
},
{.nativePageReloads = true, .prefersFuseboxFrontend = true});
{.nativePageReloads = true, .nativeSourceCodeFetching = true, .prefersFuseboxFrontend = true});
}
if (_instance) {
RCTLogWarn(