Re: [IndexedDB] setVersion blocked on uncollected garbage IDBDatabases

On Wed, Feb 9, 2011 at 5:26 PM, Glenn Maynard <glenn@zewt.org> wrote:
> Another related issue: what happens if a long-running number-cruncher worker
> keeps a database open while it works, to read data or output results?
> There's no API for sending versionchange events for IDBDatabaseSync, and it
> doesn't fit in any obvious way since it's inherently asynchronous.  I
> suppose the developer-side workaround would be to open the same database
> asynchronously in the UI thread just to listen for versionchange, and to
> terminate the thread when it's received.  Is that generally what's intended?

This is a good point. We should add the ability to dispatch
versionchange events on IDBDatabaseSync. There is no reason we
couldn't just make it a event target and add a .onversionchange
property to it.

Just because the object has some (or many, or only) synchronous
methods, doesn't mean it can't also dispatch events.

/ Jonas

Received on Thursday, 10 February 2011 01:40:53 UTC