From: Jacek Caban jacek@codeweavers.com
--- dlls/jscript/dispex.c | 2 +- dlls/jscript/tests/lang.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index 57882bf499e..493dcf7fbc9 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -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; } diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index 30d8a338fd3..2ddfc3a8341 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -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");