jscript: Do not pass DISPATCH_JSCRIPT_CALLEREXECSSOURCE flag for calls across different script contexts.

Fixes regression in calls between different contexts. Spotted by Nikolay.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2017-12-12 15:27:51 +01:00 committed by Alexandre Julliard
parent dac252ecb4
commit 2f9c2186cc
1 changed files with 4 additions and 0 deletions

View File

@ -1103,6 +1103,8 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD flags, uns
return E_FAIL;
}
if(ctx != jsdisp->ctx)
flags &= ~DISPATCH_JSCRIPT_INTERNAL_MASK;
hres = jsdisp_call(jsdisp, id, flags, argc, argv, ret);
jsdisp_release(jsdisp);
return hres;
@ -1191,6 +1193,8 @@ HRESULT disp_call_value(script_ctx_t *ctx, IDispatch *disp, IDispatch *jsthis, W
jsdisp = iface_to_jsdisp(disp);
if(jsdisp) {
if(ctx != jsdisp->ctx)
flags &= ~DISPATCH_JSCRIPT_INTERNAL_MASK;
hres = jsdisp_call_value(jsdisp, jsthis, flags, argc, argv, r);
jsdisp_release(jsdisp);
return hres;