When a script execution context (document) gets destroyed, the UI needs to be torn down and the active promise rejected with an `AbortError`.