jscript: Added delete expression for EXPRVAL_IDREF implementation.

This commit is contained in:
Jacek Caban 2008-09-30 17:48:45 +02:00 committed by Alexandre Julliard
parent 65a207466d
commit 9c248189f7
2 changed files with 18 additions and 0 deletions

View File

@ -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;

View File

@ -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();