mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
jscript: Avoid calling JS builtin functions directly.
This commit is contained in:
parent
0b4fa6e426
commit
a5e8281947
@ -85,14 +85,10 @@ static HRESULT String_length(script_ctx_t *ctx, DispatchEx *dispex, WORD flags,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* ECMA-262 3rd Edition 15.5.4.2 */
|
||||
static HRESULT String_toString(script_ctx_t *ctx, DispatchEx *dispex, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
static HRESULT stringobj_to_string(DispatchEx *dispex, VARIANT *retv)
|
||||
{
|
||||
StringInstance *string;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
if(!is_class(dispex, JSCLASS_STRING)) {
|
||||
WARN("this is not a string object\n");
|
||||
return E_FAIL;
|
||||
@ -111,13 +107,22 @@ static HRESULT String_toString(script_ctx_t *ctx, DispatchEx *dispex, WORD flags
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* ECMA-262 3rd Edition 15.5.4.2 */
|
||||
static HRESULT String_toString(script_ctx_t *ctx, DispatchEx *dispex, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
TRACE("\n");
|
||||
|
||||
return stringobj_to_string(dispex, retv);
|
||||
}
|
||||
|
||||
/* ECMA-262 3rd Edition 15.5.4.2 */
|
||||
static HRESULT String_valueOf(script_ctx_t *ctx, DispatchEx *dispex, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
TRACE("\n");
|
||||
|
||||
return String_toString(ctx, dispex, flags, dp, retv, ei, sp);
|
||||
return stringobj_to_string(dispex, retv);
|
||||
}
|
||||
|
||||
static HRESULT do_attributeless_tag_format(DispatchEx *dispex, WORD flags, DISPPARAMS *dp,
|
||||
|
Loading…
Reference in New Issue
Block a user