!1108 Reset Locking process

Merge pull request !1108 from Abonadon_hk/master
This commit is contained in:
openharmony_ci 2024-11-04 12:22:27 +00:00 committed by Gitee
commit 295557ee1f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -491,7 +491,6 @@ bool WidgetContext::DisconnectExtension()
void WidgetContext::End(const ResultCode &resultCode)
{
IAM_LOGI("in End, resultCode: %{public}d", static_cast<int32_t>(resultCode));
WidgetClient::Instance().Reset();
StopAllRunTask(resultCode);
IF_FALSE_LOGE_AND_RETURN(callerCallback_ != nullptr);
Attributes attr;
@ -530,6 +529,7 @@ void WidgetContext::End(const ResultCode &resultCode)
void WidgetContext::StopAllRunTask(const ResultCode &resultCode)
{
std::lock_guard<std::recursive_mutex> lock(mutex_);
WidgetClient::Instance().Reset();
for (auto &taskInfo : runTaskInfoList_) {
IAM_LOGI("stop task");
if (taskInfo.task == nullptr) {