indexeddbshim 17.5.0 → 17.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IDBTransaction.d.ts +1 -77
- package/dist/IDBTransaction.d.ts.map +1 -1
- package/dist/indexeddbshim-Key.js +1 -1
- package/dist/indexeddbshim-Key.min.js +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs +17 -2
- package/dist/indexeddbshim-UnicodeIdentifiers-node.cjs.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.js +17 -2
- package/dist/indexeddbshim-UnicodeIdentifiers.js.map +1 -1
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js +3 -3
- package/dist/indexeddbshim-UnicodeIdentifiers.min.js.map +1 -1
- package/dist/indexeddbshim-node.cjs +17 -2
- package/dist/indexeddbshim-node.cjs.map +1 -1
- package/dist/indexeddbshim-noninvasive.js +17 -2
- package/dist/indexeddbshim-noninvasive.js.map +1 -1
- package/dist/indexeddbshim-noninvasive.min.js +3 -3
- package/dist/indexeddbshim-noninvasive.min.js.map +1 -1
- package/dist/indexeddbshim.js +17 -2
- package/dist/indexeddbshim.js.map +1 -1
- package/dist/indexeddbshim.min.js +3 -3
- package/dist/indexeddbshim.min.js.map +1 -1
- package/package.json +1 -1
- package/src/IDBTransaction.js +16 -1
package/package.json
CHANGED
package/src/IDBTransaction.js
CHANGED
|
@@ -56,7 +56,7 @@ const readonlyProperties = ['objectStoreNames', 'mode', 'durability', 'db', 'err
|
|
|
56
56
|
* __requestsFinished: boolean,
|
|
57
57
|
* __transFinishedCb: (err: boolean, cb: ((bool?: boolean) => void)) => void,
|
|
58
58
|
* __callTransFinishedCb: (err: boolean, cb: ((bool?: boolean) => void)) => void,
|
|
59
|
-
* __transactionEndCallback: () => void,
|
|
59
|
+
* __transactionEndCallback: (() => void)|undefined,
|
|
60
60
|
* __transactionFinished: boolean,
|
|
61
61
|
* __completed: boolean,
|
|
62
62
|
* __transFinishedCbFired: boolean,
|
|
@@ -91,6 +91,19 @@ const readonlyProperties = ['objectStoreNames', 'mode', 'durability', 'db', 'err
|
|
|
91
91
|
* }} IDBTransactionFull
|
|
92
92
|
*/
|
|
93
93
|
|
|
94
|
+
/**
|
|
95
|
+
* @param {IDBTransactionFull} tx
|
|
96
|
+
* @returns {void}
|
|
97
|
+
*/
|
|
98
|
+
function releaseFinishedTransaction (tx) {
|
|
99
|
+
const pos = tx.db.__transactions.indexOf(tx);
|
|
100
|
+
if (pos !== -1) {
|
|
101
|
+
tx.db.__transactions.splice(pos, 1);
|
|
102
|
+
}
|
|
103
|
+
tx.__transactionEndCallback = undefined;
|
|
104
|
+
tx.__requests = [];
|
|
105
|
+
}
|
|
106
|
+
|
|
94
107
|
/**
|
|
95
108
|
* The IndexedDB Transaction.
|
|
96
109
|
* @see https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBTransaction
|
|
@@ -645,6 +658,7 @@ IDBTransaction.prototype.__executeRequests = function () {
|
|
|
645
658
|
} finally {
|
|
646
659
|
activeTransactions.delete(me);
|
|
647
660
|
me.__storeHandles = {};
|
|
661
|
+
releaseFinishedTransaction(me);
|
|
648
662
|
}
|
|
649
663
|
}
|
|
650
664
|
if (me.mode === 'readwrite' || me.mode === 'readonly') {
|
|
@@ -928,6 +942,7 @@ IDBTransaction.prototype.__abortTransaction = function (err) {
|
|
|
928
942
|
me.dispatchEvent(evt);
|
|
929
943
|
me.__storeHandles = {};
|
|
930
944
|
me.dispatchEvent(createEvent('__abort'));
|
|
945
|
+
releaseFinishedTransaction(me);
|
|
931
946
|
}, 0);
|
|
932
947
|
return undefined;
|
|
933
948
|
}).catch((err) => {
|