Commit ae8635db authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Use jsdisp_define_property instead of jsdisp_propput_dontenum for global properties.

parent 6b1e54a2
......@@ -978,7 +978,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, FunctionW, jsval_obj(ctx->function_constr));
hres = jsdisp_define_data_property(ctx->global, FunctionW, PROPF_WRITABLE,
jsval_obj(ctx->function_constr));
if(FAILED(hres))
return hres;
......@@ -986,7 +987,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, ObjectW, jsval_obj(ctx->object_constr));
hres = jsdisp_define_data_property(ctx->global, ObjectW, PROPF_WRITABLE,
jsval_obj(ctx->object_constr));
if(FAILED(hres))
return hres;
......@@ -994,7 +996,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, ArrayW, jsval_obj(ctx->array_constr));
hres = jsdisp_define_data_property(ctx->global, ArrayW, PROPF_WRITABLE,
jsval_obj(ctx->array_constr));
if(FAILED(hres))
return hres;
......@@ -1002,7 +1005,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, BooleanW, jsval_obj(ctx->bool_constr));
hres = jsdisp_define_data_property(ctx->global, BooleanW, PROPF_WRITABLE,
jsval_obj(ctx->bool_constr));
if(FAILED(hres))
return hres;
......@@ -1010,7 +1014,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, DateW, jsval_obj(ctx->date_constr));
hres = jsdisp_define_data_property(ctx->global, DateW, PROPF_WRITABLE,
jsval_obj(ctx->date_constr));
if(FAILED(hres))
return hres;
......@@ -1018,35 +1023,43 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, ErrorW, jsval_obj(ctx->error_constr));
hres = jsdisp_define_data_property(ctx->global, ErrorW, PROPF_WRITABLE,
jsval_obj(ctx->error_constr));
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, EvalErrorW, jsval_obj(ctx->eval_error_constr));
hres = jsdisp_define_data_property(ctx->global, EvalErrorW, PROPF_WRITABLE,
jsval_obj(ctx->eval_error_constr));
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, RangeErrorW, jsval_obj(ctx->range_error_constr));
hres = jsdisp_define_data_property(ctx->global, RangeErrorW, PROPF_WRITABLE,
jsval_obj(ctx->range_error_constr));
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, ReferenceErrorW, jsval_obj(ctx->reference_error_constr));
hres = jsdisp_define_data_property(ctx->global, ReferenceErrorW, PROPF_WRITABLE,
jsval_obj(ctx->reference_error_constr));
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, RegExpErrorW, jsval_obj(ctx->regexp_error_constr));
hres = jsdisp_define_data_property(ctx->global, RegExpErrorW, PROPF_WRITABLE,
jsval_obj(ctx->regexp_error_constr));
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, SyntaxErrorW, jsval_obj(ctx->syntax_error_constr));
hres = jsdisp_define_data_property(ctx->global, SyntaxErrorW, PROPF_WRITABLE,
jsval_obj(ctx->syntax_error_constr));
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, TypeErrorW, jsval_obj(ctx->type_error_constr));
hres = jsdisp_define_data_property(ctx->global, TypeErrorW, PROPF_WRITABLE,
jsval_obj(ctx->type_error_constr));
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, URIErrorW, jsval_obj(ctx->uri_error_constr));
hres = jsdisp_define_data_property(ctx->global, URIErrorW, PROPF_WRITABLE,
jsval_obj(ctx->uri_error_constr));
if(FAILED(hres))
return hres;
......@@ -1054,7 +1067,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, NumberW, jsval_obj(ctx->number_constr));
hres = jsdisp_define_data_property(ctx->global, NumberW, PROPF_WRITABLE,
jsval_obj(ctx->number_constr));
if(FAILED(hres))
return hres;
......@@ -1062,7 +1076,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, RegExpW, jsval_obj(ctx->regexp_constr));
hres = jsdisp_define_data_property(ctx->global, RegExpW, PROPF_WRITABLE,
jsval_obj(ctx->regexp_constr));
if(FAILED(hres))
return hres;
......@@ -1070,7 +1085,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, StringW, jsval_obj(ctx->string_constr));
hres = jsdisp_define_data_property(ctx->global, StringW, PROPF_WRITABLE,
jsval_obj(ctx->string_constr));
if(FAILED(hres))
return hres;
......@@ -1078,7 +1094,8 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, VBArrayW, jsval_obj(ctx->vbarray_constr));
hres = jsdisp_define_data_property(ctx->global, VBArrayW, PROPF_WRITABLE,
jsval_obj(ctx->vbarray_constr));
if(FAILED(hres))
return hres;
......@@ -1111,7 +1128,7 @@ HRESULT init_global(script_ctx_t *ctx)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, MathW, jsval_obj(math));
hres = jsdisp_define_data_property(ctx->global, MathW, PROPF_WRITABLE, jsval_obj(math));
jsdisp_release(math);
if(FAILED(hres))
return hres;
......@@ -1123,7 +1140,7 @@ HRESULT init_global(script_ctx_t *ctx)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, JSONW, jsval_obj(json));
hres = jsdisp_define_data_property(ctx->global, JSONW, PROPF_WRITABLE, jsval_obj(json));
jsdisp_release(json);
if(FAILED(hres))
return hres;
......@@ -1133,7 +1150,8 @@ HRESULT init_global(script_ctx_t *ctx)
if(FAILED(hres))
return hres;
hres = jsdisp_propput_dontenum(ctx->global, ActiveXObjectW, jsval_obj(constr));
hres = jsdisp_define_data_property(ctx->global, ActiveXObjectW, PROPF_WRITABLE,
jsval_obj(constr));
jsdisp_release(constr);
if(FAILED(hres))
return hres;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment