From 9a4674cd7b2920afd4e276edfbdc2998cec5775e Mon Sep 17 00:00:00 2001 From: etkmao Date: Fri, 3 Jan 2025 19:59:46 +0800 Subject: [PATCH] fix(core): fix ios thread joinable terminate crash (#4165) --- framework/ios/base/executors/HippyJSEnginesMapper.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/ios/base/executors/HippyJSEnginesMapper.mm b/framework/ios/base/executors/HippyJSEnginesMapper.mm index 8e3fdd622f1..757c3c9a8c5 100644 --- a/framework/ios/base/executors/HippyJSEnginesMapper.mm +++ b/framework/ios/base/executors/HippyJSEnginesMapper.mm @@ -62,8 +62,9 @@ EngineResource::~EngineResource() { auto runner = engine_->GetJsTaskRunner(); if (footstone::Worker::IsTaskRunning() && runner == footstone::runner::TaskRunner::GetCurrentTaskRunner()) { + __block auto dom_worder = dom_worker_; dispatch_async(dispatch_get_main_queue(), ^{ - dom_worker_->Terminate(); + dom_worder->Terminate(); }); } else { dom_worker_->Terminate();