Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(zone.js): in TaskTrackingZoneSpec track a periodic task until it is cancelled #45391

Closed
wants to merge 1 commit into from

Commits on Mar 21, 2022

  1. fix(zone.js): in TaskTrackingZoneSpec track a periodic task until it …

    …is cancelled
    
    Before this change, the macrotask for `setInterval(callback, ms)` was no
    longer tracked by `TaskTrackingZoneSpec` after the `callback` was
    invoked for the first time. Now the periodic macrotask is tracked until
    it is cancelled, e.g. `clearInterval(id)`.
    
    BREAKING CHANGE: in TaskTrackingZoneSpec track a periodic task until it is cancelled
    
    The breaking change is scoped only to the plugin
    `zone.js/plugins/task-tracking`. If you used `TaskTrackingZoneSpec` and
    checked the pending macroTasks e.g. using `(this.ngZone as any)._inner
    ._parent._properties.TaskTrackingZone.getTasksFor('macroTask')`, then
    its behavior slightly changed for periodic macrotasks. For example,
    previously the `setInterval` macrotask was no longer tracked after its
    callback was executed for the first time. Now it's tracked until
    the task is explicitly cancelled, e.g  with `clearInterval(id)`.
    
    fixes 45350
    Platonn committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    d54ed29 View commit details
    Browse the repository at this point in the history