* Executes a single lifecycle hook, making sure that: * - it is called in the non-reactive context; * - profiling data are registered.
(directive: any, hook: () => void)
| 284 | * - profiling data are registered. |
| 285 | */ |
| 286 | function callHookInternal(directive: any, hook: () => void) { |
| 287 | profiler(ProfilerEvent.LifecycleHookStart, directive, hook); |
| 288 | const prevConsumer = setActiveConsumer(null); |
| 289 | try { |
| 290 | hook.call(directive); |
| 291 | } finally { |
| 292 | setActiveConsumer(prevConsumer); |
| 293 | profiler(ProfilerEvent.LifecycleHookEnd, directive, hook); |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | /** |
| 298 | * Execute one hook against the current `LView`. |
no test coverage detected
searching dependent graphs…