mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 08:03:29 +00:00
Add log for handle scope
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7I54K Signed-off-by: maojunwei <maojunwei1@huawei.com> Change-Id: Ibad54a2208289563c59847112e52003157f05d82
This commit is contained in:
parent
e7a4a91803
commit
e03d58b44d
@ -65,14 +65,18 @@ uintptr_t EcmaHandleScope::NewHandle(JSThread *thread, JSTaggedType value)
|
||||
LOG_ECMA(INFO) << stack.str();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if ECMASCRIPT_ENABLE_NEW_HANDLE_CHECK
|
||||
thread->CheckJSTaggedType(value);
|
||||
#endif
|
||||
auto result = context->handleScopeStorageNext_;
|
||||
if (result == context->handleScopeStorageEnd_) {
|
||||
result = reinterpret_cast<JSTaggedType *>(context->ExpandHandleStorage());
|
||||
}
|
||||
#if ECMASCRIPT_ENABLE_NEW_HANDLE_CHECK
|
||||
thread->CheckJSTaggedType(value);
|
||||
if (result == nullptr) {
|
||||
LOG_ECMA(ERROR) << "result is nullptr, New handle fail!";
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
|
||||
context->handleScopeStorageNext_ = result + 1;
|
||||
*result = value;
|
||||
|
Loading…
Reference in New Issue
Block a user