浏览代码

* instead of using the 'throw' intrinsic, set a boolean flag, in the branchful
exceptions support code

Nikolay Nikolov 3 年之前
父节点
当前提交
30b503abc4
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      rtl/wasm32/except_branchful.inc

+ 6 - 2
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;