An invalid downcast from `nsHTMLDocument` to `nsIContent` could have lead to undefined behavior. External Reference: https://www.mozilla.org/en-US/security/advisories/mfsa2023-05/#CVE-2023-25736