(name unistring.String, descr PropertyDescriptor, throw bool)
| 446 | } |
| 447 | |
| 448 | func (a *templatedArrayObject) defineOwnPropertyStr(name unistring.String, descr PropertyDescriptor, throw bool) bool { |
| 449 | if name == "length" { |
| 450 | return a.val.runtime.defineArrayLength(a.getLenProp(), descr, a.setLength, throw) |
| 451 | } |
| 452 | if !a.templatedObject.defineOwnPropertyStr(name, descr, throw) { |
| 453 | return false |
| 454 | } |
| 455 | if idx := strToArrayIdx(name); idx != math.MaxUint32 { |
| 456 | a._setOwnIdx(idx) |
| 457 | } |
| 458 | return true |
| 459 | } |
| 460 | |
| 461 | func (a *templatedArrayObject) defineOwnPropertyIdx(p valueInt, desc PropertyDescriptor, throw bool) bool { |
| 462 | if !a.templatedObject.defineOwnPropertyStr(p.string(), desc, throw) { |
nothing calls this directly
no test coverage detected