If a callback registered with pageModifications throws, and it is not an async function, onBeforeRepaint will throw and the entire set of callbacks remaining in the queue will not be executed. This means that a bug in a feature could become visible to the user as an entirely different feature not functioning, resulting in their bug report being very difficult to find the root cause of.
This, as they say in the business, Bad.
Only vaguely related: #1001 (in a vague sense the opposite of that PR in a number of ways, actually)
Platform
MacOS 14.4.1 arm64
Browser
Chrome 125.0.6422.77
Addon version
v0.23.6 (+ dev commits)
Details
https://github.com/AprilSylph/XKit-Rewritten/blob/a7bad978ff9978eecb8dc437dae7ef9af3a5571f/src/util/mutations.js#L77-L82
If a callback registered with
pageModifications
throws, and it is not an async function, onBeforeRepaint will throw and the entire set of callbacks remaining in the queue will not be executed. This means that a bug in a feature could become visible to the user as an entirely different feature not functioning, resulting in their bug report being very difficult to find the root cause of.This, as they say in the business, Bad.
Only vaguely related: #1001 (in a vague sense the opposite of that PR in a number of ways, actually)