jscript: Properly support missing array elements in Array.pop.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5f9f9a45e9
commit
89da4559ee
|
@ -387,9 +387,10 @@ static HRESULT Array_pop(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, unsigned
|
|||
hres = jsdisp_get_idx(jsthis, length, &val);
|
||||
if(SUCCEEDED(hres))
|
||||
hres = jsdisp_delete_idx(jsthis, length);
|
||||
else if(hres == DISP_E_UNKNOWNNAME)
|
||||
else if(hres == DISP_E_UNKNOWNNAME) {
|
||||
val = jsval_undefined();
|
||||
else
|
||||
hres = S_OK;
|
||||
}else
|
||||
return hres;
|
||||
|
||||
if(SUCCEEDED(hres))
|
||||
|
|
|
@ -909,6 +909,8 @@ arr = [,,,,,];
|
|||
tmp = arr.pop();
|
||||
ok(arr.length === 5, "arr.length = " + arr.length);
|
||||
ok(tmp === undefined, "tmp = " + tmp);
|
||||
tmp = [1,2,,,].pop();
|
||||
ok(tmp === undefined, "tmp = " + tmp);
|
||||
|
||||
function PseudoArray() {
|
||||
this[0] = 0;
|
||||
|
|
Loading…
Reference in New Issue