From: Gabriel Ivăncescu gabrielopcode@gmail.com
It already bails out early if the thread_data was already populated, so only one thread can reach here at one time.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/jscript/jscript.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c index 191747c7173..32e6278a5d0 100644 --- a/dlls/jscript/jscript.c +++ b/dlls/jscript/jscript.c @@ -776,11 +776,7 @@ static HRESULT WINAPI JScript_SetScriptSite(IActiveScript *iface,
ctx->last_match = jsstr_empty();
- ctx = InterlockedCompareExchangePointer((void**)&This->ctx, ctx, NULL); - if(ctx) { - script_release(ctx); - return E_UNEXPECTED; - } + This->ctx = ctx; }
/* Retrieve new dispatches for persistent named items */