Jacek Caban : jscript: Directly return error code instead of using throw_syntax_error.

Alexandre Julliard julliard at winehq.org
Sun Feb 2 12:56:45 CST 2020


Module: wine
Branch: master
Commit: df70647b007feff7156de84378a4301fdaa890dc
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=df70647b007feff7156de84378a4301fdaa890dc

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Jan 31 17:23:21 2020 +0100

jscript: Directly return error code instead of using throw_syntax_error.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/jscript/enumerator.c | 2 +-
 dlls/jscript/jscript.h    | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/jscript/enumerator.c b/dlls/jscript/enumerator.c
index 5f5b135cb5..753c29c9cd 100644
--- a/dlls/jscript/enumerator.c
+++ b/dlls/jscript/enumerator.c
@@ -303,7 +303,7 @@ static HRESULT EnumeratorConstr_value(script_ctx_t *ctx, vdisp_t *vthis, WORD fl
     switch(flags) {
     case DISPATCH_CONSTRUCT: {
         if (argc > 1)
-            return throw_syntax_error(ctx, JS_E_INVALIDARG, NULL);
+            return JS_E_INVALIDARG;
 
         hres = create_enumerator(ctx, (argc == 1) ? &argv[0] : 0, &obj);
         if(FAILED(hres))
diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h
index ec5cd08e4d..9933347950 100644
--- a/dlls/jscript/jscript.h
+++ b/dlls/jscript/jscript.h
@@ -312,7 +312,6 @@ HRESULT Function_get_value(script_ctx_t*,jsdisp_t*,jsval_t*) DECLSPEC_HIDDEN;
 struct _function_code_t *Function_get_code(jsdisp_t*) DECLSPEC_HIDDEN;
 #define DEFAULT_FUNCTION_VALUE {NULL, Function_value,0, Function_get_value}
 
-HRESULT throw_syntax_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN;
 HRESULT throw_type_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN;
 jsdisp_t *create_builtin_error(script_ctx_t *ctx) DECLSPEC_HIDDEN;
 




More information about the wine-cvs mailing list