| 3672 | if (jsDebuggerInfo.has_value()) { |
| 3673 | daemonClient->sendJsDebuggerInfo(jsDebuggerInfo.value().debuggerPort, |
| 3674 | jsDebuggerInfo.value().websocketTargets); |
| 3675 | } |
| 3676 | |
| 3677 | notifyDaemonClientEvent(DaemonClientEventTypeConnected, daemonClientJs.get(), JSValue(), jsEntry); |
| 3678 | if (!jsEntry.exceptionTracker) { |
| 3679 | onRecoverableError("daemonClientConnected", jsEntry.exceptionTracker); |
| 3680 | return; |
| 3681 | } |
| 3682 | }); |
| 3683 | } |
| 3684 | |
| 3685 | void JavaScriptRuntime::daemonClientDisconnected(const Shared<IDaemonClient>& daemonClient) { |
| 3686 | dispatchOnJsThreadUnattributed([=](JavaScriptEntryParameters& jsEntry) { |
| 3687 | const auto& it = _daemonClients.find(daemonClient->getConnectionId()); |
| 3688 | if (it != _daemonClients.end()) { |
| 3689 | auto daemonClientJs = it->second; |
| 3690 | _daemonClients.erase(it); |
| 3691 | |
| 3692 | notifyDaemonClientEvent(DaemonClientEventTypeDisconnected, daemonClientJs.get(), JSValue(), jsEntry); |
| 3693 | if (!jsEntry.exceptionTracker) { |
| 3694 | onRecoverableError("daemonClientDisconnected", jsEntry.exceptionTracker); |
| 3695 | return; |
| 3696 | } |
| 3697 | } |
| 3698 | }); |
| 3699 | } |
no test coverage detected