From d2af53f58c100fd4e6976c573bfe5168feae0a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E4=BA=91=E9=A3=9E?= Date: Fri, 22 Aug 2025 15:16:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DUT=E7=BC=96=E8=AF=91=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=20thread=5Ftermination=5Ftest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/ICU97D?from=project-issue Signed-off-by: 杨云飞 --- test/executiontest/thread_termination_test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/executiontest/thread_termination_test.cpp b/test/executiontest/thread_termination_test.cpp index eb7aa612ff..8b2d363e50 100644 --- a/test/executiontest/thread_termination_test.cpp +++ b/test/executiontest/thread_termination_test.cpp @@ -127,7 +127,7 @@ HWTEST_F_L0(ThreadTerminationTest, TerminateFromThreadItself) JSThread *thread = vm_->GetAssociatedJSThread(); auto* factory = vm_->GetFactory(); JSHandle globalEnv = factory->NewGlobalEnv(); - SaveAndSwitchEnv(thread, globalEnv); + SaveAndSwitchEnv(thread, globalEnv.GetTaggedValue()); JSNApi::EnableUserUncaughtErrorHandler(vm_); RegisterGlobalTemplate(vm_, TerminateThread, Fail, Signal); TryCatch tryCatch(vm_); @@ -141,7 +141,7 @@ HWTEST_F_L0(ThreadTerminationTest, TerminateFromOtherThread) JSThread *thread = vm_->GetAssociatedJSThread(); auto* factory = vm_->GetFactory(); JSHandle globalEnv = factory->NewGlobalEnv(); - SaveAndSwitchEnv(thread, globalEnv); + SaveAndSwitchEnv(thread, globalEnv.GetTaggedValue()); TerminatorThread terminatorThread(vm_); terminatorThread.Run(); JSNApi::EnableUserUncaughtErrorHandler(vm_); @@ -158,7 +158,7 @@ HWTEST_F_L0(ThreadTerminationTest, TerminateFromOtherThreadWithoutCall) JSThread *thread = vm_->GetAssociatedJSThread(); auto* factory = vm_->GetFactory(); JSHandle globalEnv = factory->NewGlobalEnv(); - SaveAndSwitchEnv(thread, globalEnv); + SaveAndSwitchEnv(thread, globalEnv.GetTaggedValue()); TerminatorThread terminatorThread(vm_); terminatorThread.RunWithSleep(); JSNApi::EnableUserUncaughtErrorHandler(vm_); @@ -175,7 +175,7 @@ HWTEST_F_L0(ThreadTerminationTest, TerminateClearArrayJoinStack) JSThread *thread = vm_->GetAssociatedJSThread(); auto* factory = vm_->GetFactory(); JSHandle globalEnv = factory->NewGlobalEnv(); - SaveAndSwitchEnv(thread, globalEnv); + SaveAndSwitchEnv(thread, globalEnv.GetTaggedValue()); JSNApi::EnableUserUncaughtErrorHandler(vm_); RegisterGlobalTemplate(vm_, TerminateThread, Fail, Signal); TryCatch tryCatch(vm_); @@ -189,7 +189,7 @@ HWTEST_F_L0(ThreadTerminationTest, TerminateInMicroTask) JSThread *thread = vm_->GetAssociatedJSThread(); auto* factory = vm_->GetFactory(); JSHandle globalEnv = factory->NewGlobalEnv(); - SaveAndSwitchEnv(thread, globalEnv); + SaveAndSwitchEnv(thread, globalEnv.GetTaggedValue()); JSNApi::EnableUserUncaughtErrorHandler(vm_); RegisterGlobalTemplate(vm_, TerminateThread, Fail, Signal); TryCatch tryCatch(vm_); @@ -202,7 +202,7 @@ HWTEST_F_L0(ThreadTerminationTest, TerminateWithoutExecutingMicroTask) JSThread *thread = vm_->GetAssociatedJSThread(); auto* factory = vm_->GetFactory(); JSHandle globalEnv = factory->NewGlobalEnv(); - SaveAndSwitchEnv(thread, globalEnv); + SaveAndSwitchEnv(thread, globalEnv.GetTaggedValue()); JSNApi::EnableUserUncaughtErrorHandler(vm_); RegisterGlobalTemplate(vm_, TerminateThread, Fail, Signal); TryCatch tryCatch(vm_); -- Gitee