I have a new tab page extension that uses an offscreen document. When there are NTP tabs, an offscreen is created, when there are none of them, an offscreen is being closed.
The problem is that: First I open a lot of NTP tabs and some others (
google.com | chrome://extensions, whatever). After that, I close my browser, and when I reopen it, a warning appears about incorrectly closing the browser with a suggestion to restore previously closed tabs. Crash on close does not happens every time.
There is no such problem if the extension is disabled. How do I debug it?