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: make requestIdleCallback handle type a number #50012

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

robik
Copy link
Contributor

@robik robik commented Mar 13, 2025

Summary:

This PR changes the return value of requestIdleCallback and parameter type of cancelIdleCallback from opaque object with NativeState into number to further match WebAPI.

Fixes #49684

Changelog:

[GENERAL] [FIXED] - Fixed requestIdleCallback handle type

Test Plan:

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Mar 13, 2025
@facebook-github-bot
Copy link
Contributor

@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@rubennorte
Copy link
Contributor

@robik we should have a Fantom test reproducing the issue and validating the fix. Conceptually, the current solution should work correctly. The fact that the handle is an opaque object vs. a number should have nothing to do with the linked issue.

@rubennorte
Copy link
Contributor

I added a placeholder testing some of the initial assumptions in:

This introduces some complexity that, unless it fixes an actual bug, I'm not sure we should merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bridgeless idleCallbacks do not return correct handle
3 participants