()
| 96 | } |
| 97 | |
| 98 | const run = () => { |
| 99 | if (node.fn === null) { |
| 100 | // trying to run a destroyed watch is noop |
| 101 | return; |
| 102 | } |
| 103 | |
| 104 | if (isInNotificationPhase()) { |
| 105 | throw new Error( |
| 106 | typeof ngDevMode !== 'undefined' && ngDevMode |
| 107 | ? 'Schedulers cannot synchronously execute watches while scheduling.' |
| 108 | : '', |
| 109 | ); |
| 110 | } |
| 111 | |
| 112 | node.dirty = false; |
| 113 | if (node.version > 0 && !consumerPollProducersForChange(node)) { |
| 114 | return; |
| 115 | } |
| 116 | node.version++; |
| 117 | |
| 118 | const prevConsumer = consumerBeforeComputation(node); |
| 119 | try { |
| 120 | node.cleanupFn(); |
| 121 | node.cleanupFn = NOOP_CLEANUP_FN; |
| 122 | node.fn(registerOnCleanup); |
| 123 | } finally { |
| 124 | consumerAfterComputation(node, prevConsumer); |
| 125 | } |
| 126 | }; |
| 127 | |
| 128 | node.ref = { |
| 129 | notify: () => consumerMarkDirty(node), |
nothing calls this directly
no test coverage detected