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

RESOLVED FIXED in Firefox 41

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: talex5, Assigned: bent.mozilla)

Tracking

36 Branch
mozilla41
x86_64
Linux
Points:
---

Firefox Tracking Flags

(firefox41 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
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
Blocks: 965185
Created attachment 8625392 [details] [diff] [review]
Tighten up warnings, v1

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 4

4 years ago
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+
https://hg.mozilla.org/mozilla-central/rev/195067eb3141
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
status-firefox41: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.