()
| 300 | } |
| 301 | |
| 302 | func (p *proxyObject) proto() *Object { |
| 303 | target := p.target |
| 304 | if v, ok := p.checkHandler().getPrototypeOf(target); ok { |
| 305 | var handlerProto *Object |
| 306 | if v != _null { |
| 307 | handlerProto = p.val.runtime.toObject(v) |
| 308 | } |
| 309 | if !target.self.isExtensible() && !p.__sameValue(handlerProto, target.self.proto()) { |
| 310 | panic(p.val.runtime.NewTypeError("'getPrototypeOf' on proxy: proxy target is non-extensible but the trap did not return its actual prototype")) |
| 311 | } |
| 312 | return handlerProto |
| 313 | } |
| 314 | |
| 315 | return target.self.proto() |
| 316 | } |
| 317 | |
| 318 | func (p *proxyObject) setProto(proto *Object, throw bool) bool { |
| 319 | target := p.target |
nothing calls this directly
no test coverage detected