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

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2020-02-20 21:28:01 +01:00 committed by Alexandre Julliard
parent f32a729032
commit 9576ff7048
1 changed files with 2 additions and 1 deletions

View File

@ -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;