(throw bool)
| 345 | } |
| 346 | |
| 347 | func (p *proxyObject) preventExtensions(throw bool) bool { |
| 348 | target := p.target |
| 349 | if booleanTrapResult, ok := p.checkHandler().preventExtensions(target); ok { |
| 350 | if !booleanTrapResult { |
| 351 | p.val.runtime.typeErrorResult(throw, "'preventExtensions' on proxy: trap returned falsish") |
| 352 | return false |
| 353 | } |
| 354 | if target.self.isExtensible() { |
| 355 | panic(p.val.runtime.NewTypeError("'preventExtensions' on proxy: trap returned truish but the proxy target is extensible")) |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | return target.self.preventExtensions(throw) |
| 360 | } |
| 361 | |
| 362 | func propToValueProp(v Value) *valueProperty { |
| 363 | if v == nil { |
nothing calls this directly
no test coverage detected