W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: LocalStorage inside Worker

From: Glenn Maynard <glenn@zewt.org>
Date: Fri, 7 Jan 2011 04:58:12 -0500
Message-ID: <AANLkTimzUowX16W+m-8Y+CrjZvZwJykspRWBphq03M34@mail.gmail.com>
To: Felix Halim <felix.halim@gmail.com>
Cc: Jonas Sicking <jonas@sicking.cc>, Jeremy Orlow <jorlow@chromium.org>, public-webapps WG <public-webapps@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:15 UTC