Closed Bug 969043 Opened 11 years ago Closed 4 years ago

Log warning if HomeProvider consumer tries saving data outside of sync window

Categories

(Firefox for Android Graveyard :: Data Providers, defect, P2)

ARM
Android
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: Margaret, Unassigned)

References

Details

Attachments

(1 obsolete file)

No description provided.
Assignee: nobody → margaret.leibovic
Priority: -- → P1
Attachment #8392894 - Flags: review?(margaret.leibovic)
Comment on attachment 8392894 [details] [diff] [review] Log warning in save()/deleteAll() calls outside of sync window (r=margaret) Review of attachment 8392894 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/modules/HomeProvider.jsm @@ +302,5 @@ > let db = yield getDatabaseConnection(); > try { > + if (!gWritesAreExpected) { > + Cu.reportError("HomeStorage: save() called outside of sync window"); > + } I think it might be clearer to move these checks right to the top of save/deleteAll, instead of placing them inside the tasks.
Attachment #8392894 - Flags: review?(margaret.leibovic) → review+
Assignee: margaret.leibovic → lucasr.at.mozilla
Priority: P1 → P2
(In reply to :Margaret Leibovic from comment #2) > Comment on attachment 8392894 [details] [diff] [review] > Log warning in save()/deleteAll() calls outside of sync window (r=margaret) > > Review of attachment 8392894 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: mobile/android/modules/HomeProvider.jsm > @@ +302,5 @@ > > let db = yield getDatabaseConnection(); > > try { > > + if (!gWritesAreExpected) { > > + Cu.reportError("HomeStorage: save() called outside of sync window"); > > + } > > I think it might be clearer to move these checks right to the top of > save/deleteAll, instead of placing them inside the tasks. Fair enough, done.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 31
I just realized this patch doesn't actually work as expected if the consumer spawns a task within its requestSync callback function, which is what it would do if it's calling save/deleteAll. We need to think of a better way to address this issue...
(In reply to :Margaret Leibovic from comment #6) > I just realized this patch doesn't actually work as expected if the consumer > spawns a task within its requestSync callback function, which is what it > would do if it's calling save/deleteAll. We need to think of a better way to > address this issue... Ouch, you're right. Re-open? File a new bug?
(In reply to Lucas Rocha (:lucasr) from comment #7) > (In reply to :Margaret Leibovic from comment #6) > > I just realized this patch doesn't actually work as expected if the consumer > > spawns a task within its requestSync callback function, which is what it > > would do if it's calling save/deleteAll. We need to think of a better way to > > address this issue... > > Ouch, you're right. Re-open? File a new bug? Normally I hate re-opening bugs, but there isn't much going on in this bug, so I think it would be fine to land a follow-up patch here. I was thinking about this, maybe we'll need to change the API? It's not immediately clear to me how to fix this problem.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Depends on: 997538
I backed out the original patch here to avoid having these confusing logging messages ride the trains: https://hg.mozilla.org/integration/fx-team/rev/d6cf23c13dde
Comment on attachment 8392894 [details] [diff] [review] Log warning in save()/deleteAll() calls outside of sync window (r=margaret) Obsoleting, since this didn't work as desired.
Attachment #8392894 - Attachment is obsolete: true
Target Milestone: Firefox 31 → ---
Setting P2 hub bugs to block hub v2 EPIC bug (targeting fx31 release). Filter on epic-hub-bugs.
Blocks: 1014030
Assignee: lucasr.at.mozilla → nobody
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: REOPENED → RESOLVED
Closed: 11 years ago4 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: