Closed Bug 1138778 Opened 9 years ago Closed 9 years ago

[ringtones] Don't resolve promises until indexedDB transactions are completed

Categories

(Firefox OS Graveyard :: Gaia::Ringtones, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: squib, Assigned: squib)

Details

Attachments

(3 files)

This comes from bug 1116732 comment 15. Sometimes we close the ringtones app before a read-write transaction completes, causing it to roll back the transaction. I haven't seen this in action myself, but let's be safe and fix it.
Attachment #8571729 - Flags: review?(dflanagan)
Comment on attachment 8571729 [details] [review]
[gaia] jimporter:ringtones-transact > mozilla-b2g:master

Looks good to me. I'm assuming you've tested the modification with the ringtones app to ensure that adding and deleting still work as expected.

I'm glad you caught this. There was a serious bug in asyncStorage.js based on calling callbacks when requests completed instead of when the transaction was completed.

I'd recommend that you uplift this to 2.2
Comment on attachment 8571729 [details] [review]
[gaia] jimporter:ringtones-transact > mozilla-b2g:master

Oops, forgot to set r+ with my previous comment.
Attachment #8571729 - Flags: review?(dflanagan) → review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
reverted for causing https://treeherder.mozilla.org/logviewer.html#?job_id=1480732&repo=b2g-inbound
Status: RESOLVED → REOPENED
Flags: needinfo?(squibblyflabbetydoo)
Resolution: FIXED → ---
Today I learned that Autolander doesn't care if you broke all the tests! Fixing...
Flags: needinfo?(squibblyflabbetydoo)
Attached patch InterdiffSplinter Review
Comment on attachment 8575156 [details] [review]
[gaia] jimporter:ringtones-transact-fix > mozilla-b2g:master

Re-review time! I ran the tests myself this time instead of blindly trusting Autolander, and everything looks good.
Attachment #8575156 - Flags: review?(dflanagan)
Comment on attachment 8575156 [details] [review]
[gaia] jimporter:ringtones-transact-fix > mozilla-b2g:master

looks good to me.
Attachment #8575156 - Flags: review?(dflanagan) → review+
Forgot to mark checkin-needed...
Keywords: checkin-needed
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: