Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleteDatabase error case should never happen #74

Closed
inexorabletash opened this issue Apr 18, 2016 · 3 comments
Closed

deleteDatabase error case should never happen #74

inexorabletash opened this issue Apr 18, 2016 · 3 comments
Labels
Milestone

Comments

@inexorabletash
Copy link
Member

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?

@sicking
Copy link
Contributor

sicking commented Apr 18, 2016

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

I have no other recollection.

@inexorabletash inexorabletash added this to the V2 milestone Aug 1, 2016
@nolanlawson
Copy link
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.

@inexorabletash
Copy link
Member Author

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
Labels
Projects
None yet
Development

No branches or pull requests

3 participants