[Bug]: 修复应用开始调试会崩溃

desc: 修复应用开始调试会崩溃

solu: 修复应用开始调试会崩溃

issue: https://gitee.com/openharmony/arkcompiler_toolchain/issues/I8LVBX

Signed-off-by: wanghuan2022 <wanghuan80@huawei.com>
Change-Id: I7be386d3268e2163f232c98178e12a22d74b7683
This commit is contained in:
wanghuan2022 2023-12-05 13:39:51 +08:00
parent e662764274
commit eccb9626f0

View File

@ -152,15 +152,14 @@ Dispatcher::Dispatcher(const EcmaVM *vm, ProtocolChannel *channel)
std::make_unique<TracingImpl::DispatcherImpl>(channel, std::move(tracing));
auto runtime = std::make_unique<RuntimeImpl>(vm, channel);
dispatchers_["Runtime"] =
std::make_unique<RuntimeImpl::DispatcherImpl>(channel, std::move(runtime));
// only debugApp need to initialize debugger
if (vm->GetJsDebuggerManager()->IsDebugApp()) {
auto debugger = std::make_unique<DebuggerImpl>(vm, channel, runtime.get());
dispatchers_["Debugger"] =
std::make_unique<DebuggerImpl::DispatcherImpl>(channel, std::move(debugger));
}
dispatchers_["Runtime"] =
std::make_unique<RuntimeImpl::DispatcherImpl>(channel, std::move(runtime));
auto dom = std::make_unique<DomImpl>();
dispatchers_["DOM"] =