Commit 9576ff70 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

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

parent f32a7290
...@@ -306,6 +306,7 @@ void enter_script(script_ctx_t *ctx, jsexcept_t *ei) ...@@ -306,6 +306,7 @@ void enter_script(script_ctx_t *ctx, jsexcept_t *ei)
HRESULT leave_script(script_ctx_t *ctx, HRESULT result) HRESULT leave_script(script_ctx_t *ctx, HRESULT result)
{ {
jsexcept_t *ei = ctx->ei; jsexcept_t *ei = ctx->ei;
BOOL enter_notified = ei->enter_notified;
JScriptError *error; JScriptError *error;
TRACE("ctx %p ei %p prev %p\n", ctx, ei, ei->prev); 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) ...@@ -333,7 +334,7 @@ HRESULT leave_script(script_ctx_t *ctx, HRESULT result)
result = SCRIPT_E_REPORTED; result = SCRIPT_E_REPORTED;
} }
} }
if(ei->enter_notified && ctx->site) if(enter_notified && ctx->site)
IActiveScriptSite_OnLeaveScript(ctx->site); IActiveScriptSite_OnLeaveScript(ctx->site);
reset_ei(ei); reset_ei(ei);
return result; return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment