Commit 20007e58 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Use jsdisp_define_data_property for arguments object properties.

parent ae8c45c6
...@@ -180,9 +180,11 @@ HRESULT setup_arguments_object(script_ctx_t *ctx, call_frame_t *frame) ...@@ -180,9 +180,11 @@ HRESULT setup_arguments_object(script_ctx_t *ctx, call_frame_t *frame)
args->argc = frame->argc; args->argc = frame->argc;
args->frame = frame; args->frame = frame;
hres = jsdisp_propput_dontenum(&args->jsdisp, lengthW, jsval_number(args->argc)); hres = jsdisp_define_data_property(&args->jsdisp, lengthW, PROPF_WRITABLE | PROPF_CONFIGURABLE,
jsval_number(args->argc));
if(SUCCEEDED(hres)) if(SUCCEEDED(hres))
hres = jsdisp_propput_dontenum(&args->jsdisp, caleeW, jsval_disp(to_disp(&args->function->dispex))); hres = jsdisp_define_data_property(&args->jsdisp, caleeW, PROPF_WRITABLE | PROPF_CONFIGURABLE,
jsval_obj(&args->function->dispex));
if(SUCCEEDED(hres)) if(SUCCEEDED(hres))
hres = jsdisp_propput(frame->base_scope->jsobj, argumentsW, PROPF_WRITABLE, jsval_obj(&args->jsdisp)); hres = jsdisp_propput(frame->base_scope->jsobj, argumentsW, PROPF_WRITABLE, jsval_obj(&args->jsdisp));
if(FAILED(hres)) { if(FAILED(hres)) {
......
...@@ -190,6 +190,11 @@ function test_getOwnPropertyDescriptor() { ...@@ -190,6 +190,11 @@ function test_getOwnPropertyDescriptor() {
test_own_data_prop_desc(obj, "multiline", false, false, false); test_own_data_prop_desc(obj, "multiline", false, false, false);
test_own_data_prop_desc(obj, "source", false, false, false); test_own_data_prop_desc(obj, "source", false, false, false);
(function() {
test_own_data_prop_desc(arguments, "length", true, false, true);
test_own_data_prop_desc(arguments, "callee", true, false, true);
})();
next_test(); next_test();
} }
......
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