Gabriel Ivăncescu : jscript: Preserve the 'enter_notified' field when an error occurs.

Alexandre Julliard julliard at winehq.org
Thu Feb 20 18:26:14 CST 2020


Module: wine
Branch: master
Commit: 9576ff70482eff2a4359534a84059ac398f9175f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9576ff70482eff2a4359534a84059ac398f9175f

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Thu Feb 20 21:28:01 2020 +0100

jscript: Preserve the 'enter_notified' field when an error occurs.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/jscript/jscript.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c
index f97c36f5be..5e02d4f614 100644
--- a/dlls/jscript/jscript.c
+++ b/dlls/jscript/jscript.c
@@ -306,6 +306,7 @@ void enter_script(script_ctx_t *ctx, jsexcept_t *ei)
 HRESULT leave_script(script_ctx_t *ctx, HRESULT result)
 {
     jsexcept_t *ei = ctx->ei;
+    BOOL enter_notified = ei->enter_notified;
     JScriptError *error;
 
     TRACE("ctx %p ei %p prev %p\n", ctx, ei, ei->prev);
@@ -333,7 +334,7 @@ HRESULT leave_script(script_ctx_t *ctx, HRESULT result)
                 result = SCRIPT_E_REPORTED;
         }
     }
-    if(ei->enter_notified && ctx->site)
+    if(enter_notified && ctx->site)
         IActiveScriptSite_OnLeaveScript(ctx->site);
     reset_ei(ei);
     return result;




More information about the wine-cvs mailing list