jscript: Expose RegExpError constructor in global object.
This commit is contained in:
parent
27747d3a75
commit
49fd903205
|
@ -48,6 +48,7 @@ static const WCHAR NumberW[] = {'N','u','m','b','e','r',0};
|
||||||
static const WCHAR ObjectW[] = {'O','b','j','e','c','t',0};
|
static const WCHAR ObjectW[] = {'O','b','j','e','c','t',0};
|
||||||
static const WCHAR StringW[] = {'S','t','r','i','n','g',0};
|
static const WCHAR StringW[] = {'S','t','r','i','n','g',0};
|
||||||
static const WCHAR RegExpW[] = {'R','e','g','E','x','p',0};
|
static const WCHAR RegExpW[] = {'R','e','g','E','x','p',0};
|
||||||
|
static const WCHAR RegExpErrorW[] = {'R','e','g','E','x','p','E','r','r','o','r',0};
|
||||||
static const WCHAR ActiveXObjectW[] = {'A','c','t','i','v','e','X','O','b','j','e','c','t',0};
|
static const WCHAR ActiveXObjectW[] = {'A','c','t','i','v','e','X','O','b','j','e','c','t',0};
|
||||||
static const WCHAR VBArrayW[] = {'V','B','A','r','r','a','y',0};
|
static const WCHAR VBArrayW[] = {'V','B','A','r','r','a','y',0};
|
||||||
static const WCHAR EnumeratorW[] = {'E','n','u','m','e','r','a','t','o','r',0};
|
static const WCHAR EnumeratorW[] = {'E','n','u','m','e','r','a','t','o','r',0};
|
||||||
|
@ -172,6 +173,14 @@ static HRESULT JSGlobal_RangeError(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
|
||||||
return constructor_call(ctx->range_error_constr, flags, argc, argv, retv, ei);
|
return constructor_call(ctx->range_error_constr, flags, argc, argv, retv, ei);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static HRESULT JSGlobal_RegExpError(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, VARIANT *argv,
|
||||||
|
VARIANT *retv, jsexcept_t *ei)
|
||||||
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
|
return constructor_call(ctx->regexp_error_constr, flags, argc, argv, retv, ei);
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT JSGlobal_ReferenceError(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, VARIANT *argv,
|
static HRESULT JSGlobal_ReferenceError(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, VARIANT *argv,
|
||||||
VARIANT *retv, jsexcept_t *ei)
|
VARIANT *retv, jsexcept_t *ei)
|
||||||
{
|
{
|
||||||
|
@ -1155,6 +1164,7 @@ static const builtin_prop_t JSGlobal_props[] = {
|
||||||
{RangeErrorW, JSGlobal_RangeError, PROPF_CONSTR|1},
|
{RangeErrorW, JSGlobal_RangeError, PROPF_CONSTR|1},
|
||||||
{ReferenceErrorW, JSGlobal_ReferenceError, PROPF_CONSTR|1},
|
{ReferenceErrorW, JSGlobal_ReferenceError, PROPF_CONSTR|1},
|
||||||
{RegExpW, JSGlobal_RegExp, PROPF_CONSTR|2},
|
{RegExpW, JSGlobal_RegExp, PROPF_CONSTR|2},
|
||||||
|
{RegExpErrorW, JSGlobal_RegExpError, PROPF_CONSTR|1},
|
||||||
{ScriptEngineW, JSGlobal_ScriptEngine, PROPF_METHOD},
|
{ScriptEngineW, JSGlobal_ScriptEngine, PROPF_METHOD},
|
||||||
{ScriptEngineBuildVersionW, JSGlobal_ScriptEngineBuildVersion, PROPF_METHOD},
|
{ScriptEngineBuildVersionW, JSGlobal_ScriptEngineBuildVersion, PROPF_METHOD},
|
||||||
{ScriptEngineMajorVersionW, JSGlobal_ScriptEngineMajorVersion, PROPF_METHOD},
|
{ScriptEngineMajorVersionW, JSGlobal_ScriptEngineMajorVersion, PROPF_METHOD},
|
||||||
|
|
|
@ -2545,6 +2545,7 @@ ok(Date.length == 7, "Date.length = " + Date.length);
|
||||||
ok(Enumerator.length == 7, "Enumerator.length = " + Enumerator.length);
|
ok(Enumerator.length == 7, "Enumerator.length = " + Enumerator.length);
|
||||||
ok(Error.length == 1, "Error.length = " + Error.length);
|
ok(Error.length == 1, "Error.length = " + Error.length);
|
||||||
ok(EvalError.length == 1, "EvalError.length = " + EvalError.length);
|
ok(EvalError.length == 1, "EvalError.length = " + EvalError.length);
|
||||||
|
ok(RegExpError.length == 1, "RegExpError.length = " + RegExpError.length);
|
||||||
ok(Function.length == 1, "Function.length = " + Function.length);
|
ok(Function.length == 1, "Function.length = " + Function.length);
|
||||||
ok(GetObject.length == 2, "GetObject.length = " + GetObject.length);
|
ok(GetObject.length == 2, "GetObject.length = " + GetObject.length);
|
||||||
ok(Number.length == 1, "Number.length = " + Number.length);
|
ok(Number.length == 1, "Number.length = " + Number.length);
|
||||||
|
|
|
@ -108,7 +108,7 @@ testConstructor(Error, "Error");
|
||||||
testConstructor(EvalError, "EvalError");
|
testConstructor(EvalError, "EvalError");
|
||||||
testConstructor(RangeError, "RangeError");
|
testConstructor(RangeError, "RangeError");
|
||||||
testConstructor(ReferenceError, "ReferenceError");
|
testConstructor(ReferenceError, "ReferenceError");
|
||||||
//testConstructor(RegExpError, "RegExpError");
|
testConstructor(RegExpError, "RegExpError");
|
||||||
testConstructor(SyntaxError, "SyntaxError");
|
testConstructor(SyntaxError, "SyntaxError");
|
||||||
testConstructor(TypeError, "TypeError");
|
testConstructor(TypeError, "TypeError");
|
||||||
testConstructor(URIError, "URIError");
|
testConstructor(URIError, "URIError");
|
||||||
|
|
Loading…
Reference in New Issue