1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-01 07:14:31 +00:00

jscript: Fix PROP_DELETED handling in delete_prop.

This commit is contained in:
Jacek Caban 2024-06-27 12:58:52 +02:00 committed by Alexandre Julliard
parent 8cd5eca45c
commit 26720d1c8b
2 changed files with 13 additions and 1 deletions

View File

@ -2029,7 +2029,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
static HRESULT delete_prop(dispex_prop_t *prop, BOOL *ret)
{
if(prop->type == PROP_PROTREF) {
if(prop->type == PROP_PROTREF || prop->type == PROP_DELETED) {
*ret = TRUE;
return S_OK;
}

View File

@ -1712,6 +1712,18 @@ try {
}
})();
(function() {
function constr() {}
constr.prototype = { prop: 1 };
var o = new constr(), r;
ok(o.prop === 1, "o.prop = " + o.prop);
r = delete constr.prototype.prop;
ok(r === true, "delete returned " + r);
ok(o.prop === undefined, "o.prop = " + o.prop);
r = delete o["prop"];
ok(r === true, "delete returned " + r);
})();
if (false)
if (true)
ok(false, "if evaluated");