(fn, context = { __proto__: null }, thisArg, ...args)
| 515 | } |
| 516 | |
| 517 | traceSync(fn, context = { __proto__: null }, thisArg, ...args) { |
| 518 | if (!this.hasSubscribers) { |
| 519 | return ReflectApply(fn, thisArg, args); |
| 520 | } |
| 521 | |
| 522 | const { error } = this; |
| 523 | |
| 524 | // eslint-disable-next-line no-unused-vars |
| 525 | using scope = this.#callWindow.withScope(context); |
| 526 | try { |
| 527 | const result = ReflectApply(fn, thisArg, args); |
| 528 | context.result = result; |
| 529 | return result; |
| 530 | } catch (err) { |
| 531 | context.error = err; |
| 532 | error.publish(context); |
| 533 | throw err; |
| 534 | } |
| 535 | } |
| 536 | |
| 537 | tracePromise(fn, context = { __proto__: null }, thisArg, ...args) { |
| 538 | if (!this.hasSubscribers) { |
no test coverage detected