mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 16:13:49 +00:00
!2976 修复【OpenHarmony 3.2.8.2】【低概率-1次/12h】xts libark_jsruntime.so 出现cppcrash
Merge pull request !2976 from 任堂宇/master
This commit is contained in:
commit
c334cc5f9c
@ -416,9 +416,9 @@ public:
|
||||
{
|
||||
os::memory::LockHolder lock(mutex_);
|
||||
auto thread = workerVm->GetJSThread();
|
||||
if (thread != nullptr) {
|
||||
if (thread != nullptr && hostVm != nullptr) {
|
||||
auto tid = thread->GetThreadId();
|
||||
if (tid != 0 && hostVm != nullptr && workerVm != nullptr) {
|
||||
if (tid != 0) {
|
||||
WorkerList_.emplace(tid, workerVm);
|
||||
}
|
||||
}
|
||||
@ -439,9 +439,12 @@ public:
|
||||
bool DeleteWorker(EcmaVM *hostVm, EcmaVM *workerVm)
|
||||
{
|
||||
os::memory::LockHolder lock(mutex_);
|
||||
if (hostVm != nullptr && workerVm != nullptr) {
|
||||
auto tid = workerVm->GetJSThread()->GetThreadId();
|
||||
if (tid == 0) {return false;}
|
||||
auto thread = workerVm->GetJSThread();
|
||||
if (hostVm != nullptr && thread != nullptr) {
|
||||
auto tid = thread->GetThreadId();
|
||||
if (tid == 0) {
|
||||
return false;
|
||||
}
|
||||
auto iter = WorkerList_.find(tid);
|
||||
if (iter != WorkerList_.end()) {
|
||||
WorkerList_.erase(iter);
|
||||
|
Loading…
Reference in New Issue
Block a user