Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Handle error when offscreen document already exists
A `try..catch` block has been added to catch errors about the Offscreen document already existing. This circumstance is not a bug, it's expected to happen sometimes due to race conditions between `hasDocument` and the creation step. The code in question is just meant to create the document if it doesn't exist, so it's OK if we get this error. The `hasDocument` call has been removed as well, since it's now redundant. This function wasn't safe to call anyway; it's an undocumented private function. See here for more information: * https://stackoverflow.com/a/7725839 * https://groups.google.com/a/chromium.org/g/chromium-extensions/c/D5Jg2ukyvUc4 Fixes #25118
- Loading branch information