From 27747d3a755b8414be80cc84908851e02c992733 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 16 Jul 2012 15:31:37 +0200 Subject: [PATCH] jscript: Properly set Error object's constructor property. --- dlls/jscript/error.c | 2 +- dlls/jscript/tests/lang.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c index aa948c685b7..5ff29fd01a6 100644 --- a/dlls/jscript/error.c +++ b/dlls/jscript/error.c @@ -370,7 +370,7 @@ HRESULT init_error_constr(script_ctx_t *ctx, jsdisp_t *object_prototype) hres = jsdisp_propput_name(err, nameW, &v, NULL/*FIXME*/); if(SUCCEEDED(hres)) - hres = create_builtin_function(ctx, constr_val[i], names[i], NULL, + hres = create_builtin_constructor(ctx, constr_val[i], names[i], NULL, PROPF_CONSTR|1, err, constr_addr[i]); jsdisp_release(err); diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index a0eae4a6591..78e7782576f 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -104,6 +104,14 @@ testConstructor(RegExp, "RegExp"); testConstructor(Function, "Function"); testConstructor(Date, "Date"); testConstructor(VBArray, "VBArray"); +testConstructor(Error, "Error"); +testConstructor(EvalError, "EvalError"); +testConstructor(RangeError, "RangeError"); +testConstructor(ReferenceError, "ReferenceError"); +//testConstructor(RegExpError, "RegExpError"); +testConstructor(SyntaxError, "SyntaxError"); +testConstructor(TypeError, "TypeError"); +testConstructor(URIError, "URIError"); Function.prototype.test = true; ok(testFunc1.test === true, "testFunc1.test !== true"); -- 2.11.4.GIT