Commit a5e82819 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Avoid calling JS builtin functions directly.

parent 0b4fa6e4
......@@ -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;
......@@ -112,12 +108,21 @@ static HRESULT String_toString(script_ctx_t *ctx, DispatchEx *dispex, WORD flags
}
/* 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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment