(idx uint32, throw bool)
| 462 | } |
| 463 | |
| 464 | func (a *arrayObject) _deleteIdxProp(idx uint32, throw bool) bool { |
| 465 | if idx < uint32(len(a.values)) { |
| 466 | if v := a.values[idx]; v != nil { |
| 467 | if p, ok := v.(*valueProperty); ok { |
| 468 | if !p.configurable { |
| 469 | a.val.runtime.typeErrorResult(throw, "Cannot delete property '%d' of %s", idx, a.val.toString()) |
| 470 | return false |
| 471 | } |
| 472 | a.propValueCount-- |
| 473 | } |
| 474 | a.values[idx] = nil |
| 475 | a.objCount-- |
| 476 | } |
| 477 | } |
| 478 | return true |
| 479 | } |
| 480 | |
| 481 | func (a *arrayObject) deleteStr(name unistring.String, throw bool) bool { |
| 482 | if idx := strToArrayIdx(name); idx != math.MaxUint32 { |
no test coverage detected