jscript: Use script LCID in *disp_propput* functions.

oldstable
Jacek Caban 2009-09-23 16:11:11 +02:00 committed by Alexandre Julliard
parent 8b338786aa
commit fadfab5ff6
9 changed files with 57 additions and 58 deletions

View File

@ -60,13 +60,13 @@ static HRESULT get_jsdisp_length(DispatchEx *obj, LCID lcid, jsexcept_t *ei, DWO
return hres;
}
static HRESULT set_jsdisp_length(DispatchEx *obj, LCID lcid, jsexcept_t *ei, DWORD length)
static HRESULT set_jsdisp_length(DispatchEx *obj, jsexcept_t *ei, DWORD length)
{
VARIANT var;
V_VT(&var) = VT_I4;
V_I4(&var) = length;
return jsdisp_propput_name(obj, lengthW, lcid, &var, ei, NULL/*FIXME*/);
return jsdisp_propput_name(obj, lengthW, &var, ei, NULL/*FIXME*/);
}
static WCHAR *idx_to_str(DWORD idx, WCHAR *ptr)
@ -142,7 +142,7 @@ static HRESULT concat_array(DispatchEx *array, ArrayInstance *obj, DWORD *len, L
if(FAILED(hres))
return hres;
hres = jsdisp_propput_idx(array, *len+i, lcid, &var, ei, caller);
hres = jsdisp_propput_idx(array, *len+i, &var, ei, caller);
VariantClear(&var);
if(FAILED(hres))
return hres;
@ -170,7 +170,7 @@ static HRESULT concat_obj(DispatchEx *array, IDispatch *obj, DWORD *len, LCID lc
V_VT(&var) = VT_DISPATCH;
V_DISPATCH(&var) = obj;
return jsdisp_propput_idx(array, (*len)++, lcid, &var, ei, caller);
return jsdisp_propput_idx(array, (*len)++, &var, ei, caller);
}
static HRESULT Array_concat(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
@ -196,7 +196,7 @@ static HRESULT Array_concat(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
if(V_VT(arg) == VT_DISPATCH)
hres = concat_obj(ret, V_DISPATCH(arg), &len, lcid, ei, caller);
else
hres = jsdisp_propput_idx(ret, len++, lcid, arg, ei, caller);
hres = jsdisp_propput_idx(ret, len++, arg, ei, caller);
if(FAILED(hres))
break;
}
@ -425,13 +425,13 @@ static HRESULT Array_push(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS
n = arg_cnt(dp);
for(i=0; i < n; i++) {
hres = jsdisp_propput_idx(dispex, length+i, lcid, get_arg(dp, i), ei, sp);
hres = jsdisp_propput_idx(dispex, length+i, get_arg(dp, i), ei, sp);
if(FAILED(hres))
return hres;
}
if(!is_class(dispex, JSCLASS_ARRAY)) {
hres = set_jsdisp_length(dispex, lcid, ei, length+n);
hres = set_jsdisp_length(dispex, ei, length+n);
if(FAILED(hres))
return hres;
}
@ -465,7 +465,7 @@ static HRESULT Array_shift(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS
}else {
hres = get_jsdisp_length(dispex, lcid, ei, &length);
if(SUCCEEDED(hres) && !length)
hres = set_jsdisp_length(dispex, lcid, ei, 0);
hres = set_jsdisp_length(dispex, ei, 0);
if(FAILED(hres))
return hres;
}
@ -487,13 +487,13 @@ static HRESULT Array_shift(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS
if(hres == DISP_E_UNKNOWNNAME)
hres = jsdisp_delete_idx(dispex, i-1);
else if(SUCCEEDED(hres))
hres = jsdisp_propput_idx(dispex, i-1, lcid, &v, ei, caller);
hres = jsdisp_propput_idx(dispex, i-1, &v, ei, caller);
}
if(SUCCEEDED(hres)) {
hres = jsdisp_delete_idx(dispex, length-1);
if(SUCCEEDED(hres))
hres = set_jsdisp_length(dispex, lcid, ei, length-1);
hres = set_jsdisp_length(dispex, ei, length-1);
}
if(SUCCEEDED(hres) && retv)
@ -567,7 +567,7 @@ static HRESULT Array_slice(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS
continue;
if(SUCCEEDED(hres))
hres = jsdisp_propput_idx(arr, idx-start, lcid, &v, ei, sp);
hres = jsdisp_propput_idx(arr, idx-start, &v, ei, sp);
if(FAILED(hres)) {
jsdisp_release(arr);
@ -773,7 +773,7 @@ static HRESULT Array_sort(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS
}
for(i=0; SUCCEEDED(hres) && i < length; i++)
hres = jsdisp_propput_idx(dispex, i, lcid, sorttab[i], ei, caller);
hres = jsdisp_propput_idx(dispex, i, sorttab[i], ei, caller);
}
if(vtab) {
@ -857,14 +857,14 @@ static HRESULT Array_splice(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
if(hres == DISP_E_UNKNOWNNAME)
hres = S_OK;
else if(SUCCEEDED(hres))
hres = jsdisp_propput_idx(ret_array, i, lcid, &v, ei, caller);
hres = jsdisp_propput_idx(ret_array, i, &v, ei, caller);
}
if(SUCCEEDED(hres)) {
V_VT(&v) = VT_I4;
V_I4(&v) = delete_cnt;
hres = jsdisp_propput_name(ret_array, lengthW, lcid, &v, ei, caller);
hres = jsdisp_propput_name(ret_array, lengthW, &v, ei, caller);
}
}
@ -874,7 +874,7 @@ static HRESULT Array_splice(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
if(hres == DISP_E_UNKNOWNNAME)
hres = jsdisp_delete_idx(dispex, i+add_args);
else if(SUCCEEDED(hres))
hres = jsdisp_propput_idx(dispex, i+add_args, lcid, &v, ei, caller);
hres = jsdisp_propput_idx(dispex, i+add_args, &v, ei, caller);
}
for(i=length; SUCCEEDED(hres) && i != length-delete_cnt+add_args; i--)
@ -885,17 +885,17 @@ static HRESULT Array_splice(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
if(hres == DISP_E_UNKNOWNNAME)
hres = jsdisp_delete_idx(dispex, i+add_args-1);
else if(SUCCEEDED(hres))
hres = jsdisp_propput_idx(dispex, i+add_args-1, lcid, &v, ei, caller);
hres = jsdisp_propput_idx(dispex, i+add_args-1, &v, ei, caller);
}
}
for(i=0; SUCCEEDED(hres) && i < add_args; i++)
hres = jsdisp_propput_idx(dispex, start+i, lcid, get_arg(dp,i+2), ei, caller);
hres = jsdisp_propput_idx(dispex, start+i, get_arg(dp,i+2), ei, caller);
if(SUCCEEDED(hres)) {
V_VT(&v) = VT_I4;
V_I4(&v) = length-delete_cnt+add_args;
hres = jsdisp_propput_name(dispex, lengthW, lcid, &v, ei, caller);
hres = jsdisp_propput_name(dispex, lengthW, &v, ei, caller);
}
if(FAILED(hres)) {
@ -972,7 +972,7 @@ static HRESULT Array_unshift(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA
if(FAILED(hres))
return hres;
hres = jsdisp_propput_idx(dispex, i+argc, lcid, &var, ei, caller);
hres = jsdisp_propput_idx(dispex, i+argc, &var, ei, caller);
VariantClear(&var);
}else if(hres == DISP_E_UNKNOWNNAME) {
hres = IDispatchEx_DeleteMemberByDispID(_IDispatchEx_(dispex), id);
@ -983,13 +983,13 @@ static HRESULT Array_unshift(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA
}
for(i=0; i<argc; i++) {
hres = jsdisp_propput_idx(dispex, i, lcid, get_arg(dp,i), ei, caller);
hres = jsdisp_propput_idx(dispex, i, get_arg(dp,i), ei, caller);
if(FAILED(hres))
return hres;
}
if(!is_class(dispex, JSCLASS_ARRAY)) {
hres = set_jsdisp_length(dispex, lcid, ei, length+argc);
hres = set_jsdisp_length(dispex, ei, length+argc);
if(FAILED(hres))
return hres;
}
@ -1099,7 +1099,7 @@ static HRESULT ArrayConstr_value(DispatchEx *dispex, LCID lcid, WORD flags, DISP
return hres;
for(i=0; i < arg_cnt(dp); i++) {
hres = jsdisp_propput_idx(obj, i, lcid, get_arg(dp, i), ei, caller);
hres = jsdisp_propput_idx(obj, i, get_arg(dp, i), ei, caller);
if(FAILED(hres))
break;
}

View File

@ -327,7 +327,7 @@ static HRESULT prop_get(DispatchEx *This, dispex_prop_t *prop, DISPPARAMS *dp,
return hres;
}
static HRESULT prop_put(DispatchEx *This, dispex_prop_t *prop, LCID lcid, DISPPARAMS *dp,
static HRESULT prop_put(DispatchEx *This, dispex_prop_t *prop, DISPPARAMS *dp,
jsexcept_t *ei, IServiceProvider *caller)
{
DWORD i;
@ -336,7 +336,7 @@ static HRESULT prop_put(DispatchEx *This, dispex_prop_t *prop, LCID lcid, DISPPA
switch(prop->type) {
case PROP_BUILTIN:
if(!(prop->flags & PROPF_METHOD))
return prop->u.p->invoke(This, lcid, DISPATCH_PROPERTYPUT, dp, NULL, ei, caller);
return prop->u.p->invoke(This, This->ctx->lcid, DISPATCH_PROPERTYPUT, dp, NULL, ei, caller);
case PROP_PROTREF:
prop->type = PROP_VARIANT;
prop->flags = PROPF_ENUM;
@ -559,7 +559,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
hres = prop_get(This, prop, pdp, pvarRes, &jsexcept, pspCaller);
break;
case DISPATCH_PROPERTYPUT:
hres = prop_put(This, prop, lcid, pdp, &jsexcept, pspCaller);
hres = prop_put(This, prop, pdp, &jsexcept, pspCaller);
break;
default:
FIXME("Unimplemented flags %x\n", wFlags);
@ -899,7 +899,7 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD flags, DIS
return hres;
}
HRESULT jsdisp_propput_name(DispatchEx *obj, const WCHAR *name, LCID lcid, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
HRESULT jsdisp_propput_name(DispatchEx *obj, const WCHAR *name, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
{
DISPID named_arg = DISPID_PROPERTYPUT;
DISPPARAMS dp = {val, &named_arg, 1, 1};
@ -910,20 +910,20 @@ HRESULT jsdisp_propput_name(DispatchEx *obj, const WCHAR *name, LCID lcid, VARIA
if(FAILED(hres))
return hres;
return prop_put(obj, prop, lcid, &dp, ei, caller);
return prop_put(obj, prop, &dp, ei, caller);
}
HRESULT jsdisp_propput_idx(DispatchEx *obj, DWORD idx, LCID lcid, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
HRESULT jsdisp_propput_idx(DispatchEx *obj, DWORD idx, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
{
WCHAR buf[12];
static const WCHAR formatW[] = {'%','d',0};
sprintfW(buf, formatW, idx);
return jsdisp_propput_name(obj, buf, lcid, val, ei, caller);
return jsdisp_propput_name(obj, buf, val, ei, caller);
}
HRESULT disp_propput(IDispatch *disp, DISPID id, LCID lcid, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
{
DISPID dispid = DISPID_PROPERTYPUT;
DISPPARAMS dp = {val, &dispid, 1, 1};
@ -937,7 +937,7 @@ HRESULT disp_propput(IDispatch *disp, DISPID id, LCID lcid, VARIANT *val, jsexce
prop = get_prop(jsdisp, id);
if(prop)
hres = prop_put(jsdisp, prop, lcid, &dp, ei, caller);
hres = prop_put(jsdisp, prop, &dp, ei, caller);
else
hres = DISP_E_MEMBERNOTFOUND;
@ -950,10 +950,10 @@ HRESULT disp_propput(IDispatch *disp, DISPID id, LCID lcid, VARIANT *val, jsexce
ULONG err = 0;
TRACE("using IDispatch\n");
return IDispatch_Invoke(disp, id, &IID_NULL, DISPATCH_PROPERTYPUT, lcid, &dp, NULL, &ei->ei, &err);
return IDispatch_Invoke(disp, id, &IID_NULL, ctx->lcid, DISPATCH_PROPERTYPUT, &dp, NULL, &ei->ei, &err);
}
hres = IDispatchEx_InvokeEx(dispex, id, lcid, DISPATCH_PROPERTYPUT, &dp, NULL, &ei->ei, caller);
hres = IDispatchEx_InvokeEx(dispex, id, ctx->lcid, DISPATCH_PROPERTYPUT, &dp, NULL, &ei->ei, caller);
IDispatchEx_Release(dispex);
return hres;

View File

@ -242,7 +242,7 @@ static HRESULT put_value(script_ctx_t *ctx, exprval_t *ref, VARIANT *v, jsexcept
if(ref->type != EXPRVAL_IDREF)
return throw_reference_error(ctx, ei, IDS_ILLEGAL_ASSIGN, NULL);
return disp_propput(ref->u.idref.disp, ref->u.idref.id, ctx->lcid, v, ei, NULL/*FIXME*/);
return disp_propput(ctx, ref->u.idref.disp, ref->u.idref.id, v, ei, NULL/*FIXME*/);
}
static inline BOOL is_null(const VARIANT *v)
@ -416,7 +416,7 @@ HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *so
V_VT(&var) = VT_DISPATCH;
V_DISPATCH(&var) = (IDispatch*)_IDispatchEx_(func_obj);
hres = jsdisp_propput_name(ctx->var_disp, func->expr->identifier, script->lcid, &var, ei, NULL);
hres = jsdisp_propput_name(ctx->var_disp, func->expr->identifier, &var, ei, NULL);
jsdisp_release(func_obj);
if(FAILED(hres))
return hres;
@ -616,7 +616,7 @@ static HRESULT variable_list_eval(exec_ctx_t *ctx, variable_declaration_t *var_l
if(FAILED(hres))
break;
hres = jsdisp_propput_name(ctx->var_disp, iter->identifier, ctx->parser->script->lcid, &val, ei, NULL/*FIXME*/);
hres = jsdisp_propput_name(ctx->var_disp, iter->identifier, &val, ei, NULL/*FIXME*/);
VariantClear(&val);
if(FAILED(hres))
break;
@ -1163,8 +1163,7 @@ static HRESULT catch_eval(exec_ctx_t *ctx, catch_block_t *block, return_type_t *
hres = create_dispex(ctx->parser->script, NULL, NULL, &var_disp);
if(SUCCEEDED(hres)) {
hres = jsdisp_propput_name(var_disp, block->identifier, ctx->parser->script->lcid,
&ex, &rt->ei, NULL/*FIXME*/);
hres = jsdisp_propput_name(var_disp, block->identifier, &ex, &rt->ei, NULL/*FIXME*/);
if(SUCCEEDED(hres)) {
hres = scope_push(ctx->scope_chain, var_disp, &ctx->scope_chain);
if(SUCCEEDED(hres)) {
@ -1697,7 +1696,7 @@ HRESULT array_literal_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWOR
if(FAILED(hres))
break;
hres = jsdisp_propput_idx(array, i, ctx->parser->script->lcid, &val, ei, NULL/*FIXME*/);
hres = jsdisp_propput_idx(array, i, &val, ei, NULL/*FIXME*/);
VariantClear(&val);
if(FAILED(hres))
break;
@ -1748,7 +1747,7 @@ HRESULT property_value_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWO
hres = exprval_to_value(ctx->parser->script, &exprval, ei, &val);
exprval_release(&exprval);
if(SUCCEEDED(hres)) {
hres = jsdisp_propput_name(obj, name, ctx->parser->script->lcid, &val, ei, NULL/*FIXME*/);
hres = jsdisp_propput_name(obj, name, &val, ei, NULL/*FIXME*/);
VariantClear(&val);
}
}

View File

@ -380,7 +380,7 @@ HRESULT init_error_constr(script_ctx_t *ctx, DispatchEx *object_prototype)
return E_OUTOFMEMORY;
}
hres = jsdisp_propput_name(&err->dispex, nameW, ctx->lcid, &v, NULL/*FIXME*/, NULL/*FIXME*/);
hres = jsdisp_propput_name(&err->dispex, nameW, &v, NULL/*FIXME*/, NULL/*FIXME*/);
if(SUCCEEDED(hres))
hres = create_builtin_function(ctx, constr_val[i], names[i], NULL,

View File

@ -74,7 +74,7 @@ static HRESULT init_parameters(DispatchEx *var_disp, FunctionInstance *function,
cargs = arg_cnt(dp);
for(param = function->parameters; param; param = param->next) {
hres = jsdisp_propput_name(var_disp, param->identifier, lcid,
hres = jsdisp_propput_name(var_disp, param->identifier,
i < cargs ? get_arg(dp,i) : &var_empty, ei, caller);
if(FAILED(hres))
return hres;
@ -121,7 +121,7 @@ static HRESULT create_arguments(script_ctx_t *ctx, IDispatch *calee, LCID lcid,
}
for(i=0; i < arg_cnt(dp); i++) {
hres = jsdisp_propput_idx(args, i, lcid, get_arg(dp,i), ei, caller);
hres = jsdisp_propput_idx(args, i, get_arg(dp,i), ei, caller);
if(FAILED(hres))
break;
}
@ -129,12 +129,12 @@ static HRESULT create_arguments(script_ctx_t *ctx, IDispatch *calee, LCID lcid,
if(SUCCEEDED(hres)) {
V_VT(&var) = VT_I4;
V_I4(&var) = arg_cnt(dp);
hres = jsdisp_propput_name(args, lengthW, lcid, &var, ei, caller);
hres = jsdisp_propput_name(args, lengthW, &var, ei, caller);
if(SUCCEEDED(hres)) {
V_VT(&var) = VT_DISPATCH;
V_DISPATCH(&var) = calee;
hres = jsdisp_propput_name(args, caleeW, lcid, &var, ei, caller);
hres = jsdisp_propput_name(args, caleeW, &var, ei, caller);
}
}
@ -166,7 +166,7 @@ static HRESULT create_var_disp(FunctionInstance *function, LCID lcid, DISPPARAMS
V_VT(&var) = VT_DISPATCH;
V_DISPATCH(&var) = (IDispatch*)_IDispatchEx_(arg_disp);
hres = jsdisp_propput_name(var_disp, argumentsW, lcid, &var, ei, caller);
hres = jsdisp_propput_name(var_disp, argumentsW, &var, ei, caller);
jsdisp_release(arg_disp);
}
@ -618,7 +618,7 @@ static HRESULT set_prototype(script_ctx_t *ctx, DispatchEx *dispex, DispatchEx *
V_DISPATCH(&var) = (IDispatch*)_IDispatchEx_(prototype);
memset(&jsexcept, 0, sizeof(jsexcept));
return jsdisp_propput_name(dispex, prototypeW, ctx->lcid, &var, &jsexcept, NULL/*FIXME*/);
return jsdisp_propput_name(dispex, prototypeW, &var, &jsexcept, NULL/*FIXME*/);
}
HRESULT create_builtin_function(script_ctx_t *ctx, builtin_invoke_t value_proc, const WCHAR *name,

View File

@ -887,7 +887,7 @@ HRESULT init_global(script_ctx_t *ctx)
V_VT(&var) = VT_DISPATCH;
V_DISPATCH(&var) = (IDispatch*)_IDispatchEx_(math);
hres = jsdisp_propput_name(ctx->global, MathW, ctx->lcid, &var, NULL/*FIXME*/, NULL/*FIXME*/);
hres = jsdisp_propput_name(ctx->global, MathW, &var, NULL/*FIXME*/, NULL/*FIXME*/);
jsdisp_release(math);
return hres;

View File

@ -135,10 +135,10 @@ HRESULT jsdisp_call_value(DispatchEx*,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,ISer
HRESULT jsdisp_call(DispatchEx*,DISPID,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*);
HRESULT jsdisp_call_name(DispatchEx*,const WCHAR*,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*);
HRESULT disp_propget(script_ctx_t*,IDispatch*,DISPID,VARIANT*,jsexcept_t*,IServiceProvider*);
HRESULT disp_propput(IDispatch*,DISPID,LCID,VARIANT*,jsexcept_t*,IServiceProvider*);
HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,VARIANT*,jsexcept_t*,IServiceProvider*);
HRESULT jsdisp_propget(DispatchEx*,DISPID,VARIANT*,jsexcept_t*,IServiceProvider*);
HRESULT jsdisp_propput_name(DispatchEx*,const WCHAR*,LCID,VARIANT*,jsexcept_t*,IServiceProvider*);
HRESULT jsdisp_propput_idx(DispatchEx*,DWORD,LCID,VARIANT*,jsexcept_t*,IServiceProvider*);
HRESULT jsdisp_propput_name(DispatchEx*,const WCHAR*,VARIANT*,jsexcept_t*,IServiceProvider*);
HRESULT jsdisp_propput_idx(DispatchEx*,DWORD,VARIANT*,jsexcept_t*,IServiceProvider*);
HRESULT jsdisp_propget_name(DispatchEx*,LPCWSTR,VARIANT*,jsexcept_t*,IServiceProvider*);
HRESULT jsdisp_propget_idx(DispatchEx*,DWORD,VARIANT*,jsexcept_t*,IServiceProvider*);
HRESULT jsdisp_get_id(DispatchEx*,const WCHAR*,DWORD,DISPID*);

View File

@ -3520,7 +3520,7 @@ static HRESULT create_match_array(script_ctx_t *ctx, BSTR input, const match_res
break;
}
hres = jsdisp_propput_idx(array, i+1, lcid, &var, ei, NULL/*FIXME*/);
hres = jsdisp_propput_idx(array, i+1, &var, ei, NULL/*FIXME*/);
SysFreeString(V_BSTR(&var));
if(FAILED(hres))
break;
@ -3529,13 +3529,13 @@ static HRESULT create_match_array(script_ctx_t *ctx, BSTR input, const match_res
while(SUCCEEDED(hres)) {
V_VT(&var) = VT_I4;
V_I4(&var) = result->str-input;
hres = jsdisp_propput_name(array, indexW, lcid, &var, ei, NULL/*FIXME*/);
hres = jsdisp_propput_name(array, indexW, &var, ei, NULL/*FIXME*/);
if(FAILED(hres))
break;
V_VT(&var) = VT_BSTR;
V_BSTR(&var) = input;
hres = jsdisp_propput_name(array, inputW, lcid, &var, ei, NULL/*FIXME*/);
hres = jsdisp_propput_name(array, inputW, &var, ei, NULL/*FIXME*/);
if(FAILED(hres))
break;
@ -3544,7 +3544,7 @@ static HRESULT create_match_array(script_ctx_t *ctx, BSTR input, const match_res
hres = E_OUTOFMEMORY;
break;
}
hres = jsdisp_propput_name(array, zeroW, lcid, &var, ei, NULL/*FIXME*/);
hres = jsdisp_propput_name(array, zeroW, &var, ei, NULL/*FIXME*/);
SysFreeString(V_BSTR(&var));
break;
}

View File

@ -758,7 +758,7 @@ static HRESULT String_match(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
break;
}
hres = jsdisp_propput_idx(array, i, lcid, &var, ei, NULL/*FIXME*/);
hres = jsdisp_propput_idx(array, i, &var, ei, NULL/*FIXME*/);
SysFreeString(V_BSTR(&var));
if(FAILED(hres))
break;
@ -1313,7 +1313,7 @@ static HRESULT String_split(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
break;
}
hres = jsdisp_propput_idx(array, i, lcid, &var, ei, sp);
hres = jsdisp_propput_idx(array, i, &var, ei, sp);
SysFreeString(V_BSTR(&var));
if(FAILED(hres))
break;
@ -1335,7 +1335,7 @@ static HRESULT String_split(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
V_BSTR(&var) = SysAllocStringLen(ptr, len);
if(V_BSTR(&var)) {
hres = jsdisp_propput_idx(array, i, lcid, &var, ei, sp);
hres = jsdisp_propput_idx(array, i, &var, ei, sp);
SysFreeString(V_BSTR(&var));
}else {
hres = E_OUTOFMEMORY;