W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2009

[whatwg] RFC: Alternatives to storage mutex for cookies and localStorage

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 8 Sep 2009 20:41:39 +1200
Message-ID: <11e306600909080141rcfd9313gf103017d5a5a1289@mail.gmail.com>
On Tue, Sep 8, 2009 at 7:00 PM, Aaron Boodman <aa at google.com> wrote:

> On Fri, Sep 4, 2009 at 12:02 AM, Chris Jones<cjones at mozilla.com> wrote:
> > I propose adding the functions
> >
> >  window.localStorage.beginTransaction()
> >  window.localStorage.commitTransaction()
> > or
> >  window.beginTransaction()
> >  window.commitTransaction()
>
> I think this is a good idea! I would modify it to follow the pattern
> set by the current SQLDatabase proposal, to have a callback, like
> this:
>
> window.localStorage.transaction(function() {
>  // use local storage here
> });
>
>
What is the intended semantics here? Chris' explicit commitTransaction would
throw an exception if the transaction was aborted due to data inconsistency,
leaving it up to the script to retry --- and making it clear to script
authors that non-storage side effects during the transaction are not undone.
How would you handle transaction aborts?

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090908/20af036a/attachment.htm>
Received on Tuesday, 8 September 2009 01:41:39 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:52 UTC