MobileChromeApps/mobile-chrome-apps — pull request #298 by jpchase (2014-08-27 18:56:20+00:00)
Title: Proposed fix for MCA #181

The fix is essentially adding a lock for all update calls (set(), remove(), clear()), to force updates to happen serially. The intent was to minimize the scope of the lock in each method. To ensure consistency, the lock is acquired prior to reading the existing data from storage (so that other writes are seen), and not released until the storage has been written back.