jscript: Properly set Error object's constructor property.
This commit is contained in:
parent
bf7b7272ee
commit
27747d3a75
|
@ -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*/);
|
hres = jsdisp_propput_name(err, nameW, &v, NULL/*FIXME*/);
|
||||||
|
|
||||||
if(SUCCEEDED(hres))
|
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]);
|
PROPF_CONSTR|1, err, constr_addr[i]);
|
||||||
|
|
||||||
jsdisp_release(err);
|
jsdisp_release(err);
|
||||||
|
|
|
@ -104,6 +104,14 @@ testConstructor(RegExp, "RegExp");
|
||||||
testConstructor(Function, "Function");
|
testConstructor(Function, "Function");
|
||||||
testConstructor(Date, "Date");
|
testConstructor(Date, "Date");
|
||||||
testConstructor(VBArray, "VBArray");
|
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;
|
Function.prototype.test = true;
|
||||||
ok(testFunc1.test === true, "testFunc1.test !== true");
|
ok(testFunc1.test === true, "testFunc1.test !== true");
|
||||||
|
|
Loading…
Reference in New Issue