Nothing Special   »   [go: up one dir, main page]

Open Bug 1630756 Opened 5 years ago

IDB should consider logging a console warning message when a transaction has complete/error listeners added but no abort listener

Categories

(Core :: Storage: IndexedDB, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: asuth, Unassigned)

References

Details

It seems like it's very easy in general to forget to add a transaction.onabort handler in code because aborts are so rarely seen. In particular, this has happened a few times in chrome privileged code where the lack of abort handling could potentially matter, so it would probably be useful to improve the ergonomics around this by logging something to the console and/or helping devtools expose a potential issue.

Analytically, because the abort event is bubbling one might also need to consider the state of the database, but arguably any asymmetric handling on the transaction or the database is probably a code smell.

You need to log in before you can comment on or make changes to this bug.