Skip to content

fix: Mirror setTimeout endowment in setInterval - #4127

Merged
FrederikBolding merged 1 commit into
mainfrom
fb/mirror-timeout-endowment
Sep 22, 2026
Merged

FrederikBolding merged 1 commit into
mainfrom
fb/mirror-timeout-endowment

Conversation

@FrederikBolding

@FrederikBolding FrederikBolding commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Mirror setTimeout endowment in setInterval.


Note

Low Risk
Small parity fix in the Snap timer endowment that matches an existing setTimeout pattern; no new APIs or auth/data paths.

Overview
The attenuated setInterval endowment no longer registers the Snap’s callback directly with the platform timer. It now uses the same wrapper as setTimeout: a small arrow function that forwards ...passedArgs into the hardened handler.

This keeps interval ticks consistent with timeout callbacks in the execution environment (invocation path and hardened-function behavior) without changing validation, handle registration, or clearInterval semantics.

Reviewed by Cursor Bugbot for commit ab2b91a. Bugbot is set up for automated code reviews on this repo. Configure here.

@FrederikBolding
FrederikBolding marked this pull request as ready for review September 22, 2026 11:52
@FrederikBolding
FrederikBolding requested a review from a team as a code owner September 22, 2026 11:52
@FrederikBolding
FrederikBolding added this pull request to the merge queue Sep 22, 2026
Merged via the queue into main with commit 5ee78bd Sep 22, 2026
130 checks passed
@FrederikBolding
FrederikBolding deleted the fb/mirror-timeout-endowment branch September 22, 2026 11:54
@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.60%. Comparing base (9127573) to head (ab2b91a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4127   +/-   ##
=======================================
  Coverage   98.60%   98.60%           
=======================================
  Files         429      429           
  Lines       12509    12511    +2     
  Branches     1978     1978           
=======================================
+ Hits        12334    12336    +2     
  Misses        175      175           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants