Closed Bug 1147942 Opened 11 years ago Closed 11 years ago

“An IndexedDB transaction that was not yet complete has been aborted due to page navigation”

Categories

(Core :: Storage: IndexedDB, defect)

36 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: talex5, Assigned: bent.mozilla)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0 Build ID: 20150321212544 Steps to reproduce: 1. Go to http://test.roscidus.com/static/idb.html 2. Open browser console with Ctrl-Shift-J 3. Refresh page a couple of times (Ctrl-R) Actual results: Console shows "Transaction complete" idb.html:16:1 An IndexedDB transaction that was not yet complete has been aborted due to page navigation. idb.html:13:0 "Transaction complete" idb.html:16:1 An IndexedDB transaction that was not yet complete has been aborted due to page navigation. idb.html:13:0 "Transaction complete" idb.html:16:1 Expected results: There should be no incomplete transactions (the page simply makes a single write when loaded). I asked about this on stackoverflow.com and was told it might be a browser bug: http://stackoverflow.com/questions/29242346/an-indexeddb-transaction-that-was-not-yet-complete-has-been-aborted-due-to-page
Yeah, something is fishy here.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This cleans up the warning code a little. The big problem was that we were warning for all readwrite transactions, regardless of whether they had completed or not.
Assignee: nobody → bent.mozilla
Status: NEW → ASSIGNED
Attachment #8625392 - Flags: review?(Jan.Varga)
Comment on attachment 8625392 [details] [diff] [review] Tighten up warnings, v1 Review of attachment 8625392 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/indexedDB/IDBObjectStore.cpp @@ +1434,5 @@ > IDBObjectStore::Index(const nsAString& aName, ErrorResult &aRv) > { > AssertIsOnOwningThread(); > > + if (mTransaction->IsCommittingOrDone() || mDeletedSpec) { The |mDeletedSpec| piece here should have been included in a previous bug... But since I'm changing this line anyway...
Comment on attachment 8625392 [details] [diff] [review] Tighten up warnings, v1 Review of attachment 8625392 [details] [diff] [review]: ----------------------------------------------------------------- Looks good ::: dom/indexedDB/IDBTransaction.cpp @@ +480,5 @@ > IDBTransaction::SendAbort(nsresult aResultCode) > { > AssertIsOnOwningThread(); > MOZ_ASSERT(NS_FAILED(aResultCode)); > + MOZ_ASSERT(mReadyState == COMMITTING); This should be |MOZ_ASSERT(IsCommittingOrDone());|
Attachment #8625392 - Flags: review?(Jan.Varga) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: