fix(requestIdleCallback): timeout not assigned at NativeIdleCallbacks#57571
fix(requestIdleCallback): timeout not assigned at NativeIdleCallbacks#57571pakerwreah wants to merge 1 commit into
Conversation
|
Hi @pakerwreah! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
Hey @pakerwreah. In your playground, are you sure I've been also investigation an issue around timeout value for Low priority is: With that being said, won't that trigger timeout 10s later than we actually want? |
|
@TheAdamBorek yeah, even with the patch, it is not respecting exactly my custom timeout. It is just winning the race against the low priority starving tasks. I'm not sure if that was already the case before the refactoring that caused the regression. |
|
The whole reason I found this bug is because I'm trying to migrate from We get a warning saying: But if we can't get a timeout under 10s, this is not a proper replacement. 🫤 |


Summary:
Fix #57570
Regression in
requestIdleCallbackintroduced by:The
timeoutis never assigned, so it is never forwarded toruntimeScheduler.Before the PR mentioned above, it was being assigned alongside
expirationTime, but that was removed during the refactor.Without this patch the task will keep running for up to
5 minutes(default value).Changelog:
[GENERAL] [FIXED] - Fix requestIdleCallback timeout option being ignored
Test Plan: