[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    [PATCH 03/10] jscript: Directly return error code instead of using throw_generic_error.
From:       Jacek Caban <jacek () codeweavers ! com>
Date:       2020-01-31 16:22:54
Message-ID: 65a65ab9-f938-27d0-370e-ac0fac388818 () codeweavers ! com
[Download RAW message or body]

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
---
  dlls/jscript/activex.c | 2 +-
  dlls/jscript/error.c   | 5 -----
  dlls/jscript/jscript.h | 2 --
  3 files changed, 1 insertion(+), 8 deletions(-)



["0003-jscript-Directly-return-error-code-instead-of-using-th.txt" (text/x-patch)]

diff --git a/dlls/jscript/activex.c b/dlls/jscript/activex.c
index 1c2631cc77..9c8c681b5e 100644
--- a/dlls/jscript/activex.c
+++ b/dlls/jscript/activex.c
@@ -172,7 +172,7 @@ static HRESULT ActiveXObject_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
     obj = create_activex_object(ctx, progid);
     jsstr_release(progid_str);
     if(!obj)
-        return throw_generic_error(ctx, JS_E_CANNOT_CREATE_OBJ, NULL);
+        return JS_E_CANNOT_CREATE_OBJ;
 
     hres = IUnknown_QueryInterface(obj, &IID_IDispatch, (void**)&disp);
     IUnknown_Release(obj);
diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c
index 7b35e16600..e52310d473 100644
--- a/dlls/jscript/error.c
+++ b/dlls/jscript/error.c
@@ -435,11 +435,6 @@ static HRESULT throw_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str, j
     return error;
 }
 
-HRESULT throw_generic_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
-{
-    return throw_error(ctx, error, str, ctx->error_constr);
-}
-
 HRESULT throw_range_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
 {
     return throw_error(ctx, error, str, ctx->range_error_constr);
diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h
index 93c6f92bae..05dcfd01a1 100644
--- a/dlls/jscript/jscript.h
+++ b/dlls/jscript/jscript.h
@@ -312,8 +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_eval_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN;
-HRESULT throw_generic_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN;
 HRESULT throw_range_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN;
 HRESULT throw_reference_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN;
 HRESULT throw_regexp_error(script_ctx_t*,HRESULT,const WCHAR*) DECLSPEC_HIDDEN;



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic