mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
c9c2b4f662
commit
3afe4c64f3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user