Skip to content

Inconsistent IndexedDB exceptions #5635

Open
@rakudrama

Description

In indexeddb_3_test at

   db.deleteObjectStore(STORE_NAME);

FireFox 15 throws DOMException
Chrome throws IDBDatabaseException
neither of these implement the standard library Exception.

It appears that they should all be DOMException: http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#exceptions
The exception type (exn.name) seems to be the only reliable point of diagnosis since the above spec says new exceptions not listed in the DOM4 table of exception names may have exn.code == 0.

It is clear that the DOM exceptions should implement Exception.

It is not clear beyond that what browser compatibility needs to be done.
It seems that exn.name is not well specified in practice.
exn.name is "SECURITY_ERR" in html/execeptions_test but the spec says it should be "SecurityError", with code 18 (DOMException.SecurityError).

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-webUse area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop.library-htmltype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)web-librariesIssues impacting dart:html, etc., libraries

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions