indexeddbshim 17.2.0 → 17.2.1

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.
@@ -1,4 +1,4 @@
1
- /*! indexeddbshim - v17.2.0 - 8/18/2026 */
1
+ /*! indexeddbshim - v17.2.1 - 8/18/2026 */
2
2
 
3
3
  'use strict';
4
4
 
@@ -9453,9 +9453,17 @@ IDBFactory.prototype.deleteDatabase = function (name) {
9453
9453
  * @returns {boolean}
9454
9454
  */
9455
9455
  function dbError(tx, err) {
9456
- if (calledDBError || err === true) {
9456
+ if (calledDBError) {
9457
9457
  return false;
9458
9458
  }
9459
+ // Must be set synchronously (not inside the `sysdbFinishedCbDelete` callback below) to
9460
+ // guard against reentrancy: `sysdbFinishedCbDelete` -> `rollback`/`commit` -> websql-configurable's
9461
+ // `done()` -> `currentTask.errorCallback(er)`, which is this very `dbError`, calling back into
9462
+ // us before the first invocation has finished. Without this, a second rollback/commit gets
9463
+ // issued on the shared `sysdb` connection after it has already moved on to the next queued
9464
+ // transaction, corrupting that connection's task queue (see issue with unrelated `open()` calls
9465
+ // failing/crashing after a `deleteDatabase` file-removal error).
9466
+ calledDBError = true;
9459
9467
  const er = webSQLErrback(/** @type {SQLError} */err || tx);
9460
9468
  sysdbFinishedCbDelete(true, function () {
9461
9469
  req.__done = true;
@@ -9467,7 +9475,6 @@ IDBFactory.prototype.deleteDatabase = function (name) {
9467
9475
  cancelable: true
9468
9476
  });
9469
9477
  req.dispatchEvent(e);
9470
- calledDBError = true;
9471
9478
  });
9472
9479
  return false;
9473
9480
  }