fix: Improve Timers error handling and web compatibility (fixes #45085)#45105
Closed
robik wants to merge 1 commit into
Closed
fix: Improve Timers error handling and web compatibility (fixes #45085)#45105robik wants to merge 1 commit into
robik wants to merge 1 commit into
Conversation
f38db81 to
d5f09dd
Compare
javache
requested changes
Jun 21, 2024
Member
javache
left a comment
There was a problem hiding this comment.
Thanks for improving this, a few small tweaks please.
c63a2ac to
8cfa43b
Compare
Member
|
Please also rebase to main, there are some conflicts. |
8cfa43b to
3d419f5
Compare
Contributor
Author
Rebased, should be good now :) |
Base commit: 6bb75c7 |
javache
approved these changes
Jun 24, 2024
| auto callback = args[0].getObject(rt).getFunction(rt); | ||
| auto delay = | ||
| count > 1 && args[1].isNumber() ? args[1].getNumber() : 0; | ||
| auto delay = count > 1 ? coerceNumberTimeout(rt, jsi::Value { rt, args[1] }) : 0.0; |
Member
There was a problem hiding this comment.
There should be no need to create a new jsi::Value here
Suggested change
| auto delay = count > 1 ? coerceNumberTimeout(rt, jsi::Value { rt, args[1] }) : 0.0; | |
| auto delay = count > 1 ? coerceNumberTimeout(rt, args[1]) : 0.0; |
Contributor
|
@javache has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
|
This pull request was successfully merged by @robik in af04eb7. When will my fix make it into a release? | How to file a pick request? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Improve compatibility with web implementations of JS timers.
Fixes #45085
Changelog:
[GENERAL] [CHANGED] - Timer functions are now throwing exceptions in less cases and are instead quiet quitting (similar to browsers)
[GENERAL] [CHANGED] - Timer functions
timeoutargument is now coerced to a numberTest Plan:
Updated RN tester