From 30b503abc4e628dc3c2299595ee76dba48d308fc Mon Sep 17 00:00:00 2001 From: Nikolay Nikolov Date: Tue, 5 Oct 2021 00:49:29 +0300 Subject: [PATCH] * instead of using the 'throw' intrinsic, set a boolean flag, in the branchful exceptions support code --- rtl/wasm32/except_branchful.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rtl/wasm32/except_branchful.inc b/rtl/wasm32/except_branchful.inc index bf999529ef..bc59366462 100644 --- a/rtl/wasm32/except_branchful.inc +++ b/rtl/wasm32/except_branchful.inc @@ -24,6 +24,7 @@ Var {$endif FPC_HAS_FEATURE_THREADING} ExceptObjectStack : PExceptObject; ExceptTryLevel : ObjpasInt; + RaisedException : Boolean; {$ifdef FPC_USE_PSABIEH} {$i psabieh.inc} @@ -164,7 +165,8 @@ begin with _ExceptObjectStack^ do RaiseProc(FObject,Addr,FrameCount,Frames); //longjmp(_ExceptAddrStack^.Buf^,FPC_Exception); - fpc_wasm32_throw_fpcexception; + //fpc_wasm32_throw_fpcexception; + RaisedException:=true; end; {$endif FPC_SYSTEM_HAS_RAISEEXCEPTION} @@ -246,7 +248,8 @@ begin // DoUnHandledException; ExceptObjectStack^.refcount := 0; // longjmp(_ExceptAddrStack^.Buf^,FPC_Exception); - fpc_wasm32_throw_fpcexception; +// fpc_wasm32_throw_fpcexception; + RaisedException:=true; end; {$endif FPC_SYSTEM_HAS_RERAISE} @@ -287,6 +290,7 @@ Procedure SysInitExceptions; Initialize exceptionsupport } begin + RaisedException:=false; ExceptObjectstack:=Nil; end;