@internal
()
| 539 | |
| 540 | /** @internal */ |
| 541 | _tick(): void { |
| 542 | profiler(ProfilerEvent.ChangeDetectionStart); |
| 543 | |
| 544 | if (this.tracingSnapshot !== null) { |
| 545 | // Ensure we always run `tickImpl()` in the context of the most recent snapshot, |
| 546 | // if one exists. Snapshots may be reference counted by the implementation so |
| 547 | // we want to ensure that if we request a snapshot that we use it. |
| 548 | this.tracingSnapshot.run(TracingAction.CHANGE_DETECTION, this.tickImpl); |
| 549 | } else { |
| 550 | this.tickImpl(); |
| 551 | } |
| 552 | } |
| 553 | |
| 554 | private tickImpl = (): void => { |
| 555 | (typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed); |