mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
sync jscript with wine 1.1.25
svn path=/trunk/; revision=41769
This commit is contained in:
parent
1e74322bd6
commit
2a8f77e56f
10 changed files with 1400 additions and 111 deletions
|
@ -829,7 +829,7 @@ HRESULT create_array_constr(script_ctx_t *ctx, DispatchEx **ret)
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
hres = create_builtin_function(ctx, ArrayConstr_value, PROPF_CONSTR, &array->dispex, ret);
|
||||
hres = create_builtin_function(ctx, ArrayConstr_value, NULL, PROPF_CONSTR, &array->dispex, ret);
|
||||
|
||||
IDispatchEx_Release(_IDispatchEx_(&array->dispex));
|
||||
return hres;
|
||||
|
|
|
@ -142,7 +142,7 @@ HRESULT create_bool_constr(script_ctx_t *ctx, DispatchEx **ret)
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
hres = create_builtin_function(ctx, BoolConstr_value, PROPF_CONSTR, &bool->dispex, ret);
|
||||
hres = create_builtin_function(ctx, BoolConstr_value, NULL, PROPF_CONSTR, &bool->dispex, ret);
|
||||
|
||||
jsdisp_release(&bool->dispex);
|
||||
return hres;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -293,7 +293,7 @@ static HRESULT prop_get(DispatchEx *This, dispex_prop_t *prop, LCID lcid, DISPPA
|
|||
case PROP_BUILTIN:
|
||||
if(prop->u.p->flags & PROPF_METHOD) {
|
||||
DispatchEx *obj;
|
||||
hres = create_builtin_function(This->ctx, prop->u.p->invoke, prop->u.p->flags, NULL, &obj);
|
||||
hres = create_builtin_function(This->ctx, prop->u.p->invoke, NULL, prop->u.p->flags, NULL, &obj);
|
||||
if(FAILED(hres))
|
||||
break;
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ static HRESULT Function_isPrototypeOf(DispatchEx *dispex, LCID lcid, WORD flags,
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT Function_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
||||
HRESULT Function_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
FunctionInstance *function;
|
||||
|
@ -435,7 +435,8 @@ static HRESULT FunctionProt_value(DispatchEx *dispex, LCID lcid, WORD flags, DIS
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT create_function(script_ctx_t *ctx, DWORD flags, BOOL funcprot, DispatchEx *prototype, FunctionInstance **ret)
|
||||
static HRESULT create_function(script_ctx_t *ctx, const builtin_info_t *builtin_info, DWORD flags,
|
||||
BOOL funcprot, DispatchEx *prototype, FunctionInstance **ret)
|
||||
{
|
||||
FunctionInstance *function;
|
||||
HRESULT hres;
|
||||
|
@ -446,6 +447,8 @@ static HRESULT create_function(script_ctx_t *ctx, DWORD flags, BOOL funcprot, Di
|
|||
|
||||
if(funcprot)
|
||||
hres = init_dispex(&function->dispex, ctx, &Function_info, prototype);
|
||||
else if(builtin_info)
|
||||
hres = init_dispex_from_constr(&function->dispex, ctx, builtin_info, ctx->function_constr);
|
||||
else
|
||||
hres = init_dispex_from_constr(&function->dispex, ctx, &Function_info, ctx->function_constr);
|
||||
if(FAILED(hres))
|
||||
|
@ -473,13 +476,13 @@ static HRESULT create_function(script_ctx_t *ctx, DWORD flags, BOOL funcprot, Di
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT create_builtin_function(script_ctx_t *ctx, builtin_invoke_t value_proc, DWORD flags,
|
||||
DispatchEx *prototype, DispatchEx **ret)
|
||||
HRESULT create_builtin_function(script_ctx_t *ctx, builtin_invoke_t value_proc,
|
||||
const builtin_info_t *builtin_info, DWORD flags, DispatchEx *prototype, DispatchEx **ret)
|
||||
{
|
||||
FunctionInstance *function;
|
||||
HRESULT hres;
|
||||
|
||||
hres = create_function(ctx, flags, FALSE, prototype, &function);
|
||||
hres = create_function(ctx, builtin_info, flags, FALSE, prototype, &function);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
|
@ -502,7 +505,7 @@ HRESULT create_source_function(parser_ctx_t *ctx, parameter_t *parameters, sourc
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
hres = create_function(ctx->script, PROPF_CONSTR, FALSE, prototype, &function);
|
||||
hres = create_function(ctx->script, NULL, PROPF_CONSTR, FALSE, prototype, &function);
|
||||
jsdisp_release(prototype);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
@ -534,13 +537,13 @@ HRESULT init_function_constr(script_ctx_t *ctx)
|
|||
FunctionInstance *prot, *constr;
|
||||
HRESULT hres;
|
||||
|
||||
hres = create_function(ctx, PROPF_CONSTR, TRUE, NULL, &prot);
|
||||
hres = create_function(ctx, NULL, PROPF_CONSTR, TRUE, NULL, &prot);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
prot->value_proc = FunctionProt_value;
|
||||
|
||||
hres = create_function(ctx, PROPF_CONSTR, TRUE, &prot->dispex, &constr);
|
||||
hres = create_function(ctx, NULL, PROPF_CONSTR, TRUE, &prot->dispex, &constr);
|
||||
jsdisp_release(&prot->dispex);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
|
|
@ -132,7 +132,10 @@ HRESULT jsdisp_propget_name(DispatchEx*,LPCWSTR,LCID,VARIANT*,jsexcept_t*,IServi
|
|||
HRESULT jsdisp_propget_idx(DispatchEx*,DWORD,LCID,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_get_id(DispatchEx*,const WCHAR*,DWORD,DISPID*);
|
||||
|
||||
HRESULT create_builtin_function(script_ctx_t*,builtin_invoke_t,DWORD,DispatchEx*,DispatchEx**);
|
||||
HRESULT create_builtin_function(script_ctx_t*,builtin_invoke_t,const builtin_info_t*,DWORD,
|
||||
DispatchEx*,DispatchEx**);
|
||||
HRESULT Function_value(DispatchEx*,LCID,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
|
||||
|
||||
HRESULT create_object(script_ctx_t*,DispatchEx*,DispatchEx**);
|
||||
HRESULT create_math(script_ctx_t*,DispatchEx**);
|
||||
|
|
|
@ -263,7 +263,7 @@ HRESULT create_number_constr(script_ctx_t *ctx, DispatchEx **ret)
|
|||
return hres;
|
||||
|
||||
V_VT(&number->num) = VT_I4;
|
||||
hres = create_builtin_function(ctx, NumberConstr_value, PROPF_CONSTR, &number->dispex, ret);
|
||||
hres = create_builtin_function(ctx, NumberConstr_value, NULL, PROPF_CONSTR, &number->dispex, ret);
|
||||
|
||||
jsdisp_release(&number->dispex);
|
||||
return hres;
|
||||
|
|
|
@ -154,7 +154,7 @@ HRESULT create_object_constr(script_ctx_t *ctx, DispatchEx **ret)
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
hres = create_builtin_function(ctx, ObjectConstr_value, PROPF_CONSTR, object, ret);
|
||||
hres = create_builtin_function(ctx, ObjectConstr_value, NULL, PROPF_CONSTR, object, ret);
|
||||
|
||||
jsdisp_release(object);
|
||||
return hres;
|
||||
|
|
|
@ -3685,7 +3685,7 @@ HRESULT create_regexp_constr(script_ctx_t *ctx, DispatchEx **ret)
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
hres = create_builtin_function(ctx, RegExpConstr_value, PROPF_CONSTR, ®exp->dispex, ret);
|
||||
hres = create_builtin_function(ctx, RegExpConstr_value, NULL, PROPF_CONSTR, ®exp->dispex, ret);
|
||||
|
||||
jsdisp_release(®exp->dispex);
|
||||
return hres;
|
||||
|
|
|
@ -1370,7 +1370,7 @@ HRESULT create_string_constr(script_ctx_t *ctx, DispatchEx **ret)
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
hres = create_builtin_function(ctx, StringConstr_value, PROPF_CONSTR, &string->dispex, ret);
|
||||
hres = create_builtin_function(ctx, StringConstr_value, NULL, PROPF_CONSTR, &string->dispex, ret);
|
||||
|
||||
jsdisp_release(&string->dispex);
|
||||
return hres;
|
||||
|
|
Loading…
Reference in a new issue