On Fri, Apr 26, 2013 at 12:10 PM, Benjamin Smedberg
<benja...@smedbergs.us> wrote:
> I really hope the outcome of this discussion is that we end up storing
> everything that isn't a true preference in some other datastore, and that is
> an async-by-default datastore ;-)

> With a pretty simple JSM wrapper, indexeddb could be a very good solution
> for saving JSON or JSON-like things (you don't even need JSON, because
> indexeddb does structured cloning). It can of course be used for more
> complex things as well, but if we want a durable key-value store, it could
> be as simple as:
>
> ChromeData.get('key', function(value) {
>   // null if unset
> });
>
> ChromeData.set('key', value [, function()]); // asynchronous
>
> Or maybe there's a better syntax using promises, but in any case it could
> probably be this simple.

OK, sounds like we should do this. I filed
https://bugzilla.mozilla.org/show_bug.cgi?id=866238.

> Does anyone use indexeddb in chrome right now?

The patch in bug 789348 does (though that's actually running in
content). I don't know of any existing users in code that runs on
desktop (metro seems to use it, some core b2g-related code might).

Gavin
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to