Fix invalid files in release application when loadmoduleevent

Issue:#I8JVMW

Signed-off-by: yang-19970325 <yangyang585@huawei.com>
Change-Id: I196d8c766ef0dec9b72bd64dc20f4de80c33be8d
This commit is contained in:
yang-19970325 2023-11-27 19:51:17 +08:00
parent 00454e3e64
commit 06972ab8b5

View File

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