Skip to content

fix(zone.js): guard against null handle when detecting refreshable timers - #70046

Merged
thePunderWoman merged 1 commit into
angular:mainfrom
lazerg:fix/issue-70044-null-timer-handle
Aug 3, 2026
Merged

thePunderWoman merged 1 commit into
angular:mainfrom
lazerg:fix/issue-70044-null-timer-handle

Conversation

@lazerg

@lazerg lazerg commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

A timer wrapper such as a browser extension or automation harness can block a call and return null instead of a handle. patchTimer then read .refresh on that null value and threw TypeError: Cannot read properties of null (reading 'refresh').

This guards the refresh lookup so a nullish handle counts as non-refreshable, which keeps the numeric and Node.js handle behavior unchanged.

Fixes #70044

…mers

A timer wrapper such as a browser extension, policy, or automation harness can block a call and return null instead of a handle. patchTimer then read `.refresh` on that null value and threw synchronously.

Treat a nullish handle as non-refreshable so the patched timer keeps working.

Fixes angular#70044
@pullapprove
pullapprove Bot requested a review from kirjs August 1, 2026 11:29
@angular-robot angular-robot Bot added the area: zones Issues related to zone.js label Aug 1, 2026
@ngbot ngbot Bot added this to the Backlog milestone Aug 1, 2026
@JeanMeche
JeanMeche requested review from alan-agius4 and removed request for kirjs August 1, 2026 11:30
@pullapprove
pullapprove Bot requested a review from kirjs August 1, 2026 11:31

@alan-agius4 alan-agius4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: merge The PR is ready for merge by the caretaker labels Aug 3, 2026
@JeanMeche
JeanMeche removed the request for review from kirjs August 3, 2026 08:39
@pullapprove
pullapprove Bot requested a review from kirjs August 3, 2026 08:39
@JeanMeche
JeanMeche requested review from crisbeto and removed request for kirjs August 3, 2026 08:39
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release and removed action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Aug 3, 2026
@thePunderWoman
thePunderWoman merged commit 36c2197 into angular:main Aug 3, 2026
34 checks passed
@thePunderWoman

Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

@angular-automatic-lock-bot

Copy link
Copy Markdown

This pull request has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Oct 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: zones Issues related to zone.js target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zone.js timer patch throws when native timer returns null

4 participants