> This refactor request was added in commit eb30666, though it didn't explain why the refactor is needed and what the goal is. Given that this wasn't touched for more than 5 years, it doesn't seem critical. Generally, non-trivial TODOs make more sense as GitHub issues, so that they can be discussed and triaged more easily.
This is a backport of core#23416