jscript: Don't use builtin property for exposing Boolean constructor.
This commit is contained in:
parent
e178b7ec9a
commit
6eb49669aa
|
@ -129,14 +129,6 @@ static HRESULT JSGlobal_Array(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, un
|
||||||
return constructor_call(ctx->array_constr, flags, argc, argv, r);
|
return constructor_call(ctx->array_constr, flags, argc, argv, r);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT JSGlobal_Boolean(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv,
|
|
||||||
jsval_t *r)
|
|
||||||
{
|
|
||||||
TRACE("\n");
|
|
||||||
|
|
||||||
return constructor_call(ctx->bool_constr, flags, argc, argv, r);
|
|
||||||
}
|
|
||||||
|
|
||||||
static HRESULT JSGlobal_Date(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv,
|
static HRESULT JSGlobal_Date(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv,
|
||||||
jsval_t *r)
|
jsval_t *r)
|
||||||
{
|
{
|
||||||
|
@ -1080,7 +1072,6 @@ static HRESULT JSGlobal_decodeURIComponent(script_ctx_t *ctx, vdisp_t *jsthis, W
|
||||||
|
|
||||||
static const builtin_prop_t JSGlobal_props[] = {
|
static const builtin_prop_t JSGlobal_props[] = {
|
||||||
{ArrayW, JSGlobal_Array, PROPF_CONSTR|1},
|
{ArrayW, JSGlobal_Array, PROPF_CONSTR|1},
|
||||||
{BooleanW, JSGlobal_Boolean, PROPF_CONSTR|1},
|
|
||||||
{CollectGarbageW, JSGlobal_CollectGarbage, PROPF_METHOD},
|
{CollectGarbageW, JSGlobal_CollectGarbage, PROPF_METHOD},
|
||||||
{DateW, JSGlobal_Date, PROPF_CONSTR|7},
|
{DateW, JSGlobal_Date, PROPF_CONSTR|7},
|
||||||
{EnumeratorW, JSGlobal_Enumerator, PROPF_METHOD|7},
|
{EnumeratorW, JSGlobal_Enumerator, PROPF_METHOD|7},
|
||||||
|
@ -1206,6 +1197,10 @@ HRESULT init_global(script_ctx_t *ctx)
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
return hres;
|
return hres;
|
||||||
|
|
||||||
|
hres = jsdisp_propput_dontenum(ctx->global, BooleanW, jsval_obj(ctx->bool_constr));
|
||||||
|
if(FAILED(hres))
|
||||||
|
return hres;
|
||||||
|
|
||||||
hres = jsdisp_propput_dontenum(ctx->global, ActiveXObjectW, jsval_obj(constr));
|
hres = jsdisp_propput_dontenum(ctx->global, ActiveXObjectW, jsval_obj(constr));
|
||||||
jsdisp_release(constr);
|
jsdisp_release(constr);
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
|
|
|
@ -1453,6 +1453,9 @@ ok(returnTest() === undefined, "returnTest = " + returnTest());
|
||||||
ActiveXObject = 1;
|
ActiveXObject = 1;
|
||||||
ok(ActiveXObject === 1, "ActiveXObject = " + ActiveXObject);
|
ok(ActiveXObject === 1, "ActiveXObject = " + ActiveXObject);
|
||||||
|
|
||||||
|
Boolean = 1;
|
||||||
|
ok(Boolean === 1, "Boolean = " + Boolean);
|
||||||
|
|
||||||
/* Keep this test in the end of file */
|
/* Keep this test in the end of file */
|
||||||
undefined = 6;
|
undefined = 6;
|
||||||
ok(undefined === 6, "undefined = " + undefined);
|
ok(undefined === 6, "undefined = " + undefined);
|
||||||
|
|
Loading…
Reference in New Issue