jscript: Throw error in jsdisp_delete_idx for non-configurable properties.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-04-02 20:24:30 +02:00 committed by Alexandre Julliard
parent 380ae426a4
commit f5b6c7cc7e
2 changed files with 4 additions and 5 deletions

View File

@ -2327,7 +2327,10 @@ HRESULT jsdisp_delete_idx(jsdisp_t *obj, DWORD idx)
if(FAILED(hres) || !prop)
return hres;
return delete_prop(prop, &b);
hres = delete_prop(prop, &b);
if(FAILED(hres))
return hres;
return b ? S_OK : JS_E_INVALID_ACTION;
}
HRESULT disp_delete(IDispatch *disp, DISPID id, BOOL *ret)

View File

@ -1044,13 +1044,11 @@ sync_test("freeze", function() {
Object.freeze(o);
try {
o.pop();
todo_wine.
ok(false, "exception expected on o.pop");
}catch(e) {
ok(e.name === "TypeError", "got " + e.name + " exception");
}
ok(o[0] === 1, "o[0] = " + o[0]);
todo_wine.
ok(o.length === 1, "o.length = " + o.length);
});
@ -1098,13 +1096,11 @@ sync_test("seal", function() {
Object.seal(o);
try {
o.pop();
todo_wine.
ok(false, "exception expected on o.pop");
}catch(e) {
ok(e.name === "TypeError", "got " + e.name + " exception");
}
ok(o[0] === 1, "o[0] = " + o[0]);
todo_wine.
ok(o.length === 1, "o.length = " + o.length);
});