Skip to content

deleteDatabase error case should never happen #74

Closed

Description

@inexorabletash

The steps for deleteDatabase start off with

  1. Let request be a new open request.
  2. Queue a task to run these substeps:
    1. Let result be the result of running the steps for deleting a database, with the origin of the IDBEnvironment used to access this IDBFactory, name, and request.
    2. If result is an error set the error of request to result and dispatch an event at request. The event must use the Event interface and set the type attribute to "error". The event does bubble but is not cancelable.

But the "steps for deleting a database" never return an error. This may be legacy from timeout and/or sync behavior?

Activity

  1. sicking commented on Apr 18, 2016

    @sicking
    Contributor

    Possibly. The only reason I can think of is file IO error.

    I have no other recollection.

  2. added this to the V2 milestone on Aug 1, 2016
  3. nolanlawson commented on Sep 23, 2016

    @nolanlawson
    Member

    Is this just an implementation bug that this actually does throw? I'll double-check, but I'm pretty sure some engines (Edge iirc) throw if you rapidly open/delete databases with the same name several times.

  4. inexorabletash commented on Sep 23, 2016

    @inexorabletash
    MemberAuthor

    We may want to keep this in the deleteDatabase() steps, but add something into "steps for deleting a database" to allow implementations to generate errors.

    This is similar to the "forced close" addition; in the abstract it should never be needed, but in the real world implementations run into problems and how the errors appear to scripts should be defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions