Jacek Caban : jscript: Throw error in jsdisp_delete_idx for non-configurable properties.
Alexandre Julliard
julliard at winehq.org
Fri Apr 2 16:10:12 CDT 2021
Module: wine
Branch: master
Commit: f5b6c7cc7e383fc929d97f1b9c90450f752da169
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f5b6c7cc7e383fc929d97f1b9c90450f752da169
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Apr 2 20:24:30 2021 +0200
jscript: Throw error in jsdisp_delete_idx for non-configurable properties.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/jscript/dispex.c | 5 ++++-
dlls/mshtml/tests/es5.js | 4 ----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c
index 38055fe4cfa..b62fcee0b04 100644
--- a/dlls/jscript/dispex.c
+++ b/dlls/jscript/dispex.c
@@ -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)
diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js
index f81eefdfd47..9227fa7e5a5 100644
--- a/dlls/mshtml/tests/es5.js
+++ b/dlls/mshtml/tests/es5.js
@@ -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);
});
More information about the wine-cvs
mailing list