Re: LocalStorage inside Worker

On Fri, Jan 7, 2011 at 12:30 AM, Felix Halim <felix.halim@gmail.com> wrote:
> The usage of localStorage in the main page thread is much uglier than
> any spaghetti code. Any callback could update it. Currently, everybody
> uses the localStorage in synchronous mode in the main page thread and
> assumes no other theads can modify it. Allowing workers to change its
> value (even in atomic asynchronous mode) will breaks all current
> applications.

In that case, all current applications are already broken in Chrome.

A solution that makes localStorage read-only in workers is no
solution.  "Cripple the API" isn't an answer.  I think Jonas's async
callback approach, modulo the comments I made earlier, is the sanest
approach suggested so far.  It makes localStorage *fully* accessible
from workers, and also likely improves the unimplemented-storage-mutex
situation in Chrome, which exists even without workers.

-- 
Glenn Maynard

Received on Friday, 7 January 2011 09:58:45 UTC