Use HermesRuntime to disable debugging

Summary:
Changelog: [Internal]

Debugging is enabled via `enableDebugging` with a `RuntimeAdapter` that provides a `HermesRuntime`. This same `HermesRuntime` should be passed to `disableDebugging`, not a decorated version. Change the argument type of `disableDebugging` to steer callers in the right direction.

Reviewed By: jpporto

Differential Revision: D38051662

fbshipit-source-id: ae436a4af12fa01143bfbcdb97e65e4fca90154d
This commit is contained in:
Matt Blagden 2022-08-04 14:50:45 -07:00 коммит произвёл Facebook GitHub Bot
Родитель c9c2b4f662
Коммит 3afe4c64f3
4 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -94,7 +94,7 @@ int ConnectionDemux::enableDebugging(
std::make_shared<Connection>(std::move(adapter), title, waitForDebugger));
}
void ConnectionDemux::disableDebugging(jsi::Runtime &runtime) {
void ConnectionDemux::disableDebugging(HermesRuntime &runtime) {
std::lock_guard<std::mutex> lock(mutex_);
for (auto &it : conns_) {

Просмотреть файл

@ -39,7 +39,7 @@ class ConnectionDemux {
int enableDebugging(
std::unique_ptr<RuntimeAdapter> adapter,
const std::string &title);
void disableDebugging(jsi::Runtime &runtime);
void disableDebugging(HermesRuntime &runtime);
private:
int addPage(std::shared_ptr<Connection> conn);

Просмотреть файл

@ -28,7 +28,7 @@ void enableDebugging(
demux().enableDebugging(std::move(adapter), title);
}
void disableDebugging(jsi::Runtime &runtime) {
void disableDebugging(HermesRuntime &runtime) {
demux().disableDebugging(runtime);
}

Просмотреть файл

@ -31,7 +31,7 @@ extern void enableDebugging(
* disableDebugging removes this runtime from the list of debuggable JS targets
* in this process.
*/
extern void disableDebugging(jsi::Runtime &runtime);
extern void disableDebugging(HermesRuntime &runtime);
} // namespace chrome
} // namespace inspector