Loading
Fix large blob loss: keep extracted files in memory and fix IndexedDB commit
setInDBStore resolved on request.onsuccess which fires before the
IndexedDB transaction commits. For large blobs (e.g. super.img),
the transaction can abort during commit due to storage quota limits,
silently rolling back the write while the code assumes it succeeded.
- Keep extracted blobs in memory (this.blobs) so they are always
available for the current session regardless of IndexedDB state
- getFile checks in-memory store first, falls back to IndexedDB
for blobs cached from a previous session
- setInDBStore now waits on transaction.oncomplete instead of
request.onsuccess and handles transaction.onabort
- IndexedDB write failures are caught and logged as warnings
without blocking the flash process
Signed-off-by:
Jackeagle <jackeagle102@gmail.com>