Re: [IndexedDB] setVersion blocked on uncollected garbage IDBDatabases

On Wed, Feb 9, 2011 at 5:26 PM, Glenn Maynard <> wrote
> On a related note, please see this statement from section 5.5 of the
>> MessagePort spec:
>> Authors are strongly encouraged to explicitly close MessagePort<> objects
>> to disentangle them, so that their resources can be recollected. Creating
>> many MessagePort <> objects
>> and discarding them without closing them can lead to high memory usage.
> For explicitly-created MessagePorts this is natural enough.  It's slightly
> less obvious for MessagePorts created implicitly by Worker/SharedWorker
> objects, though; I'd predict that becoming a common cause of leaks on pages
> that create and destroy a lot of threads.

It's not an issue, because when a Worker shuts down it implicitly closes all
of its MessagePorts, which would allow the renderer side to be GC'd - the
leak only happens when you release a reference to a MessagePort without
closing it. If you're creating lots of worker threads and leaving them
running, then you've got bigger memory issues than a few hundred bytes of

But, yeah, back to IDB now :)

Received on Thursday, 10 February 2011 01:42:50 UTC