mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 08:03:29 +00:00
!4458 fix cppcrash caused by evaluate fail
Merge pull request !4458 from 杨阳/fix_exception
This commit is contained in:
commit
12bee17dfb
@ -685,6 +685,7 @@ void DebuggerApi::HandleUncaughtException(const EcmaVM *ecmaVm, std::string &mes
|
||||
const GlobalEnvConstants *globalConst = thread->GlobalConstants();
|
||||
|
||||
JSHandle<JSTaggedValue> exHandle(thread, thread->GetException());
|
||||
thread->ClearException();
|
||||
if (exHandle->IsJSError()) {
|
||||
JSHandle<JSTaggedValue> nameKey = globalConst->GetHandledNameString();
|
||||
JSHandle<EcmaString> name(JSObject::GetProperty(thread, exHandle, nameKey).GetValue());
|
||||
@ -695,7 +696,6 @@ void DebuggerApi::HandleUncaughtException(const EcmaVM *ecmaVm, std::string &mes
|
||||
JSHandle<EcmaString> ecmaStr = JSTaggedValue::ToString(thread, exHandle);
|
||||
message = ConvertToString(*ecmaStr);
|
||||
}
|
||||
thread->ClearException();
|
||||
}
|
||||
|
||||
Local<FunctionRef> DebuggerApi::GenerateFuncFromBuffer(const EcmaVM *ecmaVm, const void *buffer,
|
||||
|
Loading…
Reference in New Issue
Block a user