mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
jscript: Added delete expression for EXPRVAL_IDREF implementation.
This commit is contained in:
parent
65a207466d
commit
9c248189f7
@ -2069,6 +2069,17 @@ HRESULT delete_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags
|
||||
return hres;
|
||||
|
||||
switch(exprval.type) {
|
||||
case EXPRVAL_IDREF: {
|
||||
IDispatchEx *dispex;
|
||||
|
||||
hres = IDispatch_QueryInterface(exprval.u.nameref.disp, &IID_IDispatchEx, (void**)&dispex);
|
||||
if(SUCCEEDED(hres)) {
|
||||
hres = IDispatchEx_DeleteMemberByDispID(dispex, exprval.u.idref.id);
|
||||
b = VARIANT_TRUE;
|
||||
IDispatchEx_Release(dispex);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EXPRVAL_NAMEREF: {
|
||||
IDispatchEx *dispex;
|
||||
|
||||
|
@ -741,4 +741,11 @@ function varTestFunc(varTest3) {
|
||||
var varTest4;
|
||||
}
|
||||
|
||||
deleteTest = 1;
|
||||
delete deleteTest;
|
||||
try {
|
||||
tmp = deleteTest;
|
||||
ok(false, "deleteTest not throwed exception?");
|
||||
}catch(ex) {}
|
||||
|
||||
reportSuccess();
|
||||
|
Loading…
Reference in New Issue
Block a user