(ccall func(ConstructorCall) *Object, args []Value, newTarget *Object)
| 543 | } |
| 544 | |
| 545 | func (f *nativeFuncObject) defaultConstruct(ccall func(ConstructorCall) *Object, args []Value, newTarget *Object) *Object { |
| 546 | obj := f.createInstance(newTarget) |
| 547 | ret := ccall(ConstructorCall{ |
| 548 | This: obj, |
| 549 | Arguments: args, |
| 550 | NewTarget: newTarget, |
| 551 | }) |
| 552 | |
| 553 | if ret != nil { |
| 554 | return ret |
| 555 | } |
| 556 | return obj |
| 557 | } |
| 558 | |
| 559 | func (f *nativeFuncObject) assertCallable() (func(FunctionCall) Value, bool) { |
| 560 | if f.f != nil { |
no test coverage detected