jscript: Removed no longer needed caller argument from jsdisp_call_value.

This commit is contained in:
Jacek Caban 2012-03-12 12:13:10 +01:00 committed by Alexandre Julliard
parent 93972b79cc
commit 07be020a48
5 changed files with 11 additions and 13 deletions

View File

@ -648,8 +648,7 @@ static HRESULT Array_slice(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPA
return S_OK; return S_OK;
} }
static HRESULT sort_cmp(script_ctx_t *ctx, jsdisp_t *cmp_func, VARIANT *v1, VARIANT *v2, jsexcept_t *ei, static HRESULT sort_cmp(script_ctx_t *ctx, jsdisp_t *cmp_func, VARIANT *v1, VARIANT *v2, jsexcept_t *ei, INT *cmp)
IServiceProvider *caller, INT *cmp)
{ {
HRESULT hres; HRESULT hres;
@ -662,7 +661,7 @@ static HRESULT sort_cmp(script_ctx_t *ctx, jsdisp_t *cmp_func, VARIANT *v1, VARI
args[0] = *v2; args[0] = *v2;
args[1] = *v1; args[1] = *v1;
hres = jsdisp_call_value(cmp_func, DISPATCH_METHOD, &dp, &res, ei, caller); hres = jsdisp_call_value(cmp_func, DISPATCH_METHOD, &dp, &res, ei);
if(FAILED(hres)) if(FAILED(hres))
return hres; return hres;
@ -786,7 +785,7 @@ static HRESULT Array_sort(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPAR
sorttab[i] = vtab+i; sorttab[i] = vtab+i;
for(i=0; i < length/2; i++) { for(i=0; i < length/2; i++) {
hres = sort_cmp(ctx, cmp_func, sorttab[2*i+1], sorttab[2*i], ei, caller, &cmp); hres = sort_cmp(ctx, cmp_func, sorttab[2*i+1], sorttab[2*i], ei, &cmp);
if(FAILED(hres)) if(FAILED(hres))
break; break;
@ -811,7 +810,7 @@ static HRESULT Array_sort(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPAR
memcpy(tmpbuf, sorttab+i, k*sizeof(VARIANT*)); memcpy(tmpbuf, sorttab+i, k*sizeof(VARIANT*));
while(a < k && b < bend) { while(a < k && b < bend) {
hres = sort_cmp(ctx, cmp_func, tmpbuf[a], sorttab[i+k+b], ei, caller, &cmp); hres = sort_cmp(ctx, cmp_func, tmpbuf[a], sorttab[i+k+b], ei, &cmp);
if(FAILED(hres)) if(FAILED(hres))
break; break;

View File

@ -979,14 +979,13 @@ HRESULT jsdisp_get_id(jsdisp_t *jsdisp, const WCHAR *name, DWORD flags, DISPID *
return DISP_E_UNKNOWNNAME; return DISP_E_UNKNOWNNAME;
} }
HRESULT jsdisp_call_value(jsdisp_t *jsthis, WORD flags, DISPPARAMS *dp, VARIANT *retv, HRESULT jsdisp_call_value(jsdisp_t *jsthis, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei)
jsexcept_t *ei, IServiceProvider *caller)
{ {
vdisp_t vdisp; vdisp_t vdisp;
HRESULT hres; HRESULT hres;
set_jsdisp(&vdisp, jsthis); set_jsdisp(&vdisp, jsthis);
hres = jsthis->builtin_info->value_prop.invoke(jsthis->ctx, &vdisp, flags, dp, retv, ei, caller); hres = jsthis->builtin_info->value_prop.invoke(jsthis->ctx, &vdisp, flags, dp, retv, ei, NULL);
vdisp_release(&vdisp); vdisp_release(&vdisp);
return hres; return hres;
} }

View File

@ -117,7 +117,7 @@ static HRESULT constructor_call(jsdisp_t *constr, WORD flags, DISPPARAMS *dp,
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{ {
if(flags != DISPATCH_PROPERTYGET) if(flags != DISPATCH_PROPERTYGET)
return jsdisp_call_value(constr, flags, dp, retv, ei, sp); return jsdisp_call_value(constr, flags, dp, retv, ei);
jsdisp_addref(constr); jsdisp_addref(constr);
var_set_jsdisp(retv, constr); var_set_jsdisp(retv, constr);

View File

@ -207,7 +207,7 @@ HRESULT init_dispex(jsdisp_t*,script_ctx_t*,const builtin_info_t*,jsdisp_t*) DEC
HRESULT init_dispex_from_constr(jsdisp_t*,script_ctx_t*,const builtin_info_t*,jsdisp_t*) DECLSPEC_HIDDEN; HRESULT init_dispex_from_constr(jsdisp_t*,script_ctx_t*,const builtin_info_t*,jsdisp_t*) DECLSPEC_HIDDEN;
HRESULT disp_call(script_ctx_t*,IDispatch*,DISPID,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*) DECLSPEC_HIDDEN; HRESULT disp_call(script_ctx_t*,IDispatch*,DISPID,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*) DECLSPEC_HIDDEN;
HRESULT jsdisp_call_value(jsdisp_t*,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*) DECLSPEC_HIDDEN; HRESULT jsdisp_call_value(jsdisp_t*,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*) DECLSPEC_HIDDEN;
HRESULT jsdisp_call(jsdisp_t*,DISPID,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*) DECLSPEC_HIDDEN; HRESULT jsdisp_call(jsdisp_t*,DISPID,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*) DECLSPEC_HIDDEN;
HRESULT jsdisp_call_name(jsdisp_t*,const WCHAR*,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*) DECLSPEC_HIDDEN; HRESULT jsdisp_call_name(jsdisp_t*,const WCHAR*,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*) DECLSPEC_HIDDEN;
HRESULT disp_propget(script_ctx_t*,IDispatch*,DISPID,VARIANT*,jsexcept_t*) DECLSPEC_HIDDEN; HRESULT disp_propget(script_ctx_t*,IDispatch*,DISPID,VARIANT*,jsexcept_t*) DECLSPEC_HIDDEN;

View File

@ -711,7 +711,7 @@ static HRESULT strbuf_append(strbuf_t *buf, const WCHAR *str, DWORD len)
} }
static HRESULT rep_call(script_ctx_t *ctx, jsdisp_t *func, const WCHAR *str, match_result_t *match, static HRESULT rep_call(script_ctx_t *ctx, jsdisp_t *func, const WCHAR *str, match_result_t *match,
match_result_t *parens, DWORD parens_cnt, BSTR *ret, jsexcept_t *ei, IServiceProvider *caller) match_result_t *parens, DWORD parens_cnt, BSTR *ret, jsexcept_t *ei)
{ {
DISPPARAMS dp = {NULL, NULL, 0, 0}; DISPPARAMS dp = {NULL, NULL, 0, 0};
VARIANTARG *args, *arg; VARIANTARG *args, *arg;
@ -755,7 +755,7 @@ static HRESULT rep_call(script_ctx_t *ctx, jsdisp_t *func, const WCHAR *str, mat
} }
if(SUCCEEDED(hres)) if(SUCCEEDED(hres))
hres = jsdisp_call_value(func, DISPATCH_METHOD, &dp, &var, ei, caller); hres = jsdisp_call_value(func, DISPATCH_METHOD, &dp, &var, ei);
for(i=0; i < parens_cnt+3; i++) { for(i=0; i < parens_cnt+3; i++) {
if(i != parens_cnt+1) if(i != parens_cnt+1)
@ -884,7 +884,7 @@ static HRESULT String_replace(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DI
if(rep_func) { if(rep_func) {
BSTR cstr; BSTR cstr;
hres = rep_call(ctx, rep_func, str, &match, parens, parens_cnt, &cstr, ei, caller); hres = rep_call(ctx, rep_func, str, &match, parens, parens_cnt, &cstr, ei);
if(FAILED(hres)) if(FAILED(hres))
break; break;