Repository navigation
Avoid reverse dependencies in JS library code handling time. NFC - #16118
Merged
Merged
Conversation
sbc100
force-pushed
the
cleanup_time_globals
branch
from
January 26, 2022 22:17
81d915d to
d64b31a
Compare
Specifically this change removes `_get_daylight`, `_get_daylight` and `_get_tzname` which are native symbols that were used by `tzset` which has a lot of different call sites. This made reverse dependencies on these symbols fairly common and easy to miss. See #15958 for a recent example. This change removes these functions completely in favor or just passing these addresses in as arguments. Fixes: #15958
sbc100
force-pushed
the
cleanup_time_globals
branch
from
January 26, 2022 22:18
d64b31a to
27da623
Compare
kripken
approved these changes
Jan 26, 2022
kripken
left a comment
Member
There was a problem hiding this comment.
Nice!
I really think this general pattern is the way to go: X.c in C, and it calls X_js which does the JS-specific things. And we can pass the JS the things it needs, to avoid reverse deps.
sbc100
enabled auto-merge (squash)
January 26, 2022 23:16
sbc100
disabled auto-merge
January 27, 2022 04:55
Closed
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.
Specifically this change removes
_get_daylight,_get_daylightand
_get_tznamewhich are native symbols that were used bytzsetwhich has a lot of different call sites.This made reverse dependencies on these symbols fairly common
and easy to miss. See #15958 for a recent example.
This change removes these functions completely in favor or just
passing these addresses in as arguments.
Fixes: #15958