Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upHTMLFormElement past names map "age" needs to be monotonic, and probably shouldn't be a literal time #25455
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://html.spec.whatwg.org/multipage/forms.html#past-names-map needs to sort things by various fields that include the length of time they've been in the map; our current implementation takes this very literally, calling now() to get timestamps.
now() is the wrong type of timestamp for this (https://doc.rust-lang.org/std/time/struct.SystemTime.html "this time measurement is not monotonic"), and beyond that I am pretty sure something like a serial number would suffice here, as we are only comparing entries within a single map at a time and not actually using the times for anything but a sort.