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

jscript: Directly return error code instead of using throw_uri_error.

parent 0167f4a7
......@@ -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;
......
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