On 12/11/19 3:08 PM, Gabriel Ivăncescu wrote:
diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 7a44f50..3c3098f 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -37,6 +37,7 @@ typedef struct { struct _function_vtbl_t { HRESULT (*call)(script_ctx_t*,FunctionInstance*,IDispatch*,unsigned,unsigned,jsval_t*,jsval_t*); HRESULT (*toString)(FunctionInstance*,jsstr_t**);
- function_code_t* (*get_code)(FunctionInstance*); void (*destructor)(FunctionInstance*); };
@@ -524,6 +525,13 @@ static HRESULT Function_get_arguments(script_ctx_t *ctx, jsdisp_t *jsthis, jsval return S_OK; }
+function_code_t *Function_get_code(jsdisp_t *jsthis) +{
- FunctionInstance *function = function_from_jsdisp(jsthis);
- return function->vtbl->get_code(function);
+}
An assert with is_class() would be nice here. And more importantly, this patch introduces a dead code, please send it together with code actually using it.
Thanks,
Jacek