Changed IndexedDB provider to use RW context if RO is requested. Fixes issue #128
This commit is contained in:
parent
3c9c344011
commit
fe9b94d4ec
|
@ -116,7 +116,10 @@ define(function(require) {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
IndexedDB.prototype.getReadOnlyContext = function() {
|
IndexedDB.prototype.getReadOnlyContext = function() {
|
||||||
return new IndexedDBContext(this.db, IDB_RO);
|
// Due to timing issues in Chrome with readwrite vs. readonly indexeddb transactions
|
||||||
|
// always use readwrite so we can make sure pending commits finish before callbacks.
|
||||||
|
// See https://github.com/js-platform/filer/issues/128
|
||||||
|
return new IndexedDBContext(this.db, IDB_RW);
|
||||||
};
|
};
|
||||||
IndexedDB.prototype.getReadWriteContext = function() {
|
IndexedDB.prototype.getReadWriteContext = function() {
|
||||||
return new IndexedDBContext(this.db, IDB_RW);
|
return new IndexedDBContext(this.db, IDB_RW);
|
||||||
|
|
Loading…
Reference in New Issue