Commit 39c7950a authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

jscript: Don't use atomic compare exchange when setting the script ctx.

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: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com>
parent f55db652
......@@ -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 */
......
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