I am using chrome.storage.sync for some of my chrome extensions, great tool!
But I have an issue now, after updating the storage like 10 times. It blocks and does not update anymore... No error or anything so I do not know where the problem is.
FYI: I still have space in the storage.
The code:
Storage.get_all = function(callback) {
STORAGE_SYNC.get('key', function(items) {
callback(items.gifs_v2);
});
};
Storage.post = function(id, item, callback) {
var THIS = this;
THIS.get_all(function(items) {
if(items) {
items[id] = item;
STORAGE_SYNC.set({'key': items}, callback);
} else {
THIS.post_all({}, function() {
THIS.post(id, item, callback);
});
}
})
};