MCPcopy Index your code
hub / github.com/angular/angular / markAncestorsForTraversal

Function markAncestorsForTraversal

packages/core/src/render3/util/view_utils.ts:264–280  ·  view source on GitHub ↗
(lView: LView)

Source from the content-addressed store, hash-verified

262 * flag is already `true` or the `lView` is detached.
263 */
264export function markAncestorsForTraversal(lView: LView) {
265 lView[ENVIRONMENT].changeDetectionScheduler?.notify(NotificationSource.MarkAncestorsForTraversal);
266 let parent = getLViewParent(lView);
267 while (parent !== null) {
268 // We stop adding markers to the ancestors once we reach one that already has the marker. This
269 // is to avoid needlessly traversing all the way to the root when the marker already exists.
270 if (parent[FLAGS] & LViewFlags.HasChildViewsToRefresh) {
271 break;
272 }
273
274 parent[FLAGS] |= LViewFlags.HasChildViewsToRefresh;
275 if (!viewAttachedToChangeDetector(parent)) {
276 break;
277 }
278 parent = getLViewParent(parent);
279 }
280}
281
282/**
283 * Stores a LView-specific destroy callback.

Callers 6

consumerMarkedDirtyFunction · 0.90
refreshViewFunction · 0.90
registerMethod · 0.90
markViewForRefreshFunction · 0.85

Calls 3

getLViewParentFunction · 0.85
notifyMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…