[PATCH 2/8] jscript: Move the clear_script_queue up to SCRIPTSTATE_INITIALIZED.
Gabriel Ivăncescu
gabrielopcode at gmail.com
Wed Feb 19 10:38:04 CST 2020
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
Not only is this more correct, but it also simplifies the 7th patch. Clearing
it in SCRIPTSTATE_UNINITIALIZED is now redundant.
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 8fc39c2..98fe759 100644
--- a/dlls/jscript/jscript.c
+++ b/dlls/jscript/jscript.c
@@ -363,6 +363,8 @@ static void decrease_state(JScript *This, SCRIPTSTATE state)
return;
/* FALLTHROUGH */
case SCRIPTSTATE_INITIALIZED:
+ clear_script_queue(This);
+
if(This->ctx->host_global) {
IDispatch_Release(This->ctx->host_global);
This->ctx->host_global = NULL;
@@ -402,7 +404,6 @@ static void decrease_state(JScript *This, SCRIPTSTATE state)
/* FALLTHROUGH */
case SCRIPTSTATE_UNINITIALIZED:
change_state(This, state);
- clear_script_queue(This);
break;
default:
assert(0);
--
2.21.0
More information about the wine-devel
mailing list