Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Possible change to asyncStorage

12 views
Skip to first unread message

David Flanagan

unread,
Mar 27, 2014, 5:24:02 PM3/27/14
to <dev-gaia@lists.mozilla.org>, Vicamo Yang
The methods of the shared/js/async_storage.js module triggers their
callbacks when the IndexedDB read or write request succeeds. This can
cause AbortError errors if an app exits in response to an asyncStorage
callback. Apparently the right thing to do, and what asyncStorage
should have done from the beginning, is to trigger the callbacks when
the transaction is successful, not when the request is successful.

In bug 936703, Vicamo is proposing to change async_storage.js to fix
this, in order to resolve a 1.4+ bug. The patch looks good to me, and
this seems like a good change to make. But I wanted to bring this up
here because this is a widely used module and I fear side effects that
we did not anticipate. There might be slight performance differences,
for example.

If you have thoughts about this, please share them here. Or if you find
that your asyncStorage code stops working the way you expect, check to
see what has happened in bug 936703.

David

David Flanagan

unread,
Mar 28, 2014, 1:00:58 PM3/28/14
to dev-...@lists.mozilla.org
This change has now landed on master and 1.4
> _______________________________________________
> dev-gaia mailing list
> dev-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-gaia

0 new messages