jscript: Directly return error code instead of using throw_uri_error.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0167f4a7dd
commit
2224736967
|
@ -445,11 +445,6 @@ HRESULT throw_type_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
|
|||
return throw_error(ctx, error, str, ctx->type_error_constr);
|
||||
}
|
||||
|
||||
HRESULT throw_uri_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
|
||||
{
|
||||
return throw_error(ctx, error, str, ctx->uri_error_constr);
|
||||
}
|
||||
|
||||
jsdisp_t *create_builtin_error(script_ctx_t *ctx)
|
||||
{
|
||||
jsdisp_t *constr = ctx->error_constr, *r;
|
||||
|
|
|
@ -632,7 +632,7 @@ static HRESULT JSGlobal_encodeURI(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
|
|||
i = WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, ptr, 1, NULL, 0, NULL, NULL)*3;
|
||||
if(!i) {
|
||||
jsstr_release(str);
|
||||
return throw_uri_error(ctx, JS_E_INVALID_URI_CHAR, NULL);
|
||||
return JS_E_INVALID_URI_CHAR;
|
||||
}
|
||||
|
||||
len += i;
|
||||
|
@ -710,7 +710,7 @@ static HRESULT JSGlobal_decodeURI(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
|
|||
|
||||
if(!res) {
|
||||
jsstr_release(str);
|
||||
return throw_uri_error(ctx, JS_E_INVALID_URI_CODING, NULL);
|
||||
return JS_E_INVALID_URI_CODING;
|
||||
}
|
||||
|
||||
ptr += i*3+2;
|
||||
|
@ -783,7 +783,7 @@ static HRESULT JSGlobal_encodeURIComponent(script_ctx_t *ctx, vdisp_t *jsthis, W
|
|||
size = WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, ptr, 1, NULL, 0, NULL, NULL);
|
||||
if(!size) {
|
||||
jsstr_release(str);
|
||||
return throw_uri_error(ctx, JS_E_INVALID_URI_CHAR, NULL);
|
||||
return JS_E_INVALID_URI_CHAR;
|
||||
}
|
||||
len += size*3;
|
||||
}
|
||||
|
|
|
@ -314,7 +314,6 @@ struct _function_code_t *Function_get_code(jsdisp_t*) DECLSPEC_HIDDEN;
|
|||
|
||||
HRESULT throw_syntax_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN;
|
||||
HRESULT throw_type_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN;
|
||||
HRESULT throw_uri_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN;
|
||||
jsdisp_t *create_builtin_error(script_ctx_t *ctx) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT create_object(script_ctx_t*,jsdisp_t*,jsdisp_t**) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue