Module: wine Branch: master Commit: 27747d3a755b8414be80cc84908851e02c992733 URL: http://source.winehq.org/git/wine.git/?a=commit;h=27747d3a755b8414be80cc8490...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Jul 16 15:31:37 2012 +0200
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 deletions(-)
diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c index aa948c6..5ff29fd 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 a0eae4a..78e7782 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");