Commit 58722dfe authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

jscript: Treat prototype refs as non-existent when deleting.

Delete only affects own properties. Signed-off-by: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 80be5c25
......@@ -1621,6 +1621,11 @@ 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) {
*ret = TRUE;
return S_OK;
}
if(!(prop->flags & PROPF_CONFIGURABLE)) {
*ret = FALSE;
return S_OK;
......
......@@ -1565,6 +1565,11 @@ ok(arr["test1"] === true, "arr[test1] !== true");
ok(arr["test2"] === true, "arr[test2] !== true");
ok(arr["test3"] === true, "arr[test3] !== true");
ok((delete inobj.test1) === true, "delete inobj.test1 returned false");
ok(!("test1" in inobj), "test1 is still in inobj after delete");
ok((delete inobj.test3) === true, "delete inobj.test3 returned false");
ok("test3" in inobj, "test3 is not in inobj after delete");
tmp = new Object();
tmp.test = false;
ok((delete tmp.test) === true, "delete returned false");
......
......@@ -1192,7 +1192,6 @@ sync_test("__proto__", function() {
ok(obj.__proto__ === ctor.prototype, "obj.__proto__ !== ctor.prototype");
r = (delete x.__proto__);
todo_wine.
ok(r, "delete x.__proto__ returned " + r);
ok(Object.prototype.hasOwnProperty("__proto__"), "__proto__ is not a property of Object.prototype after delete");
r = Object.getPrototypeOf(x);
......
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