jscript: Fix Object.defineProperty return value.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
98cf6a6ac7
commit
7dab372271
|
@ -500,6 +500,8 @@ static HRESULT Object_defineProperty(script_ctx_t *ctx, vdisp_t *jsthis, WORD fl
|
|||
|
||||
hres = jsdisp_define_property(obj, name, &prop_desc);
|
||||
release_property_descriptor(&prop_desc);
|
||||
if(SUCCEEDED(hres) && r)
|
||||
*r = jsval_obj(jsdisp_addref(obj));
|
||||
return hres;
|
||||
}
|
||||
|
||||
|
|
|
@ -311,8 +311,9 @@ function test_defineProperty() {
|
|||
ok(false, "expected exception");
|
||||
}
|
||||
|
||||
var obj = new Object();
|
||||
Object.defineProperty(obj, "test", {});
|
||||
var obj = new Object(), defined;
|
||||
defined = Object.defineProperty(obj, "test", {});
|
||||
ok(defined === obj, "defined != obj");
|
||||
ok("test" in obj, "test is not in obj");
|
||||
test_own_data_prop_desc(obj, "test", false, false, false);
|
||||
ok(obj.test === undefined, "obj.test = " + obj.test);
|
||||
|
|
Loading…
Reference in New Issue