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
  (function (factory) {
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -10433,9 +10433,17 @@
10433
10433
  * @returns {boolean}
10434
10434
  */
10435
10435
  function dbError(tx, err) {
10436
- if (calledDBError || err === true) {
10436
+ if (calledDBError) {
10437
10437
  return false;
10438
10438
  }
10439
+ // Must be set synchronously (not inside the `sysdbFinishedCbDelete` callback below) to
10440
+ // guard against reentrancy: `sysdbFinishedCbDelete` -> `rollback`/`commit` -> websql-configurable's
10441
+ // `done()` -> `currentTask.errorCallback(er)`, which is this very `dbError`, calling back into
10442
+ // us before the first invocation has finished. Without this, a second rollback/commit gets
10443
+ // issued on the shared `sysdb` connection after it has already moved on to the next queued
10444
+ // transaction, corrupting that connection's task queue (see issue with unrelated `open()` calls
10445
+ // failing/crashing after a `deleteDatabase` file-removal error).
10446
+ calledDBError = true;
10439
10447
  var er = webSQLErrback(/** @type {SQLError} */err || tx);
10440
10448
  sysdbFinishedCbDelete(true, function () {
10441
10449
  req.__done = true;
@@ -10447,7 +10455,6 @@
10447
10455
  cancelable: true
10448
10456
  });
10449
10457
  req.dispatchEvent(e);
10450
- calledDBError = true;
10451
10458
  });
10452
10459
  return false;
10453
10460
  }