(trapResult bool, targetProp Value, name fmt.Stringer, target *Object, throw bool)
| 715 | } |
| 716 | |
| 717 | func (p *proxyObject) proxyDeleteCheck(trapResult bool, targetProp Value, name fmt.Stringer, target *Object, throw bool) { |
| 718 | if trapResult { |
| 719 | if targetProp == nil { |
| 720 | return |
| 721 | } |
| 722 | if targetDesc, ok := targetProp.(*valueProperty); ok { |
| 723 | if !targetDesc.configurable { |
| 724 | panic(p.val.runtime.NewTypeError("'deleteProperty' on proxy: property '%s' is a non-configurable property but the trap returned truish", name.String())) |
| 725 | } |
| 726 | } |
| 727 | if !target.self.isExtensible() { |
| 728 | panic(p.val.runtime.NewTypeError("'deleteProperty' on proxy: trap returned truish for property '%s' but the proxy target is non-extensible", name.String())) |
| 729 | } |
| 730 | } else { |
| 731 | p.val.runtime.typeErrorResult(throw, "'deleteProperty' on proxy: trap returned falsish for property '%s'", name.String()) |
| 732 | } |
| 733 | } |
| 734 | |
| 735 | func (p *proxyObject) deleteStr(name unistring.String, throw bool) bool { |
| 736 | target := p.target |
no test coverage detected