Closed
Bug 842374
Opened 13 years ago
Closed 13 years ago
Use GeckoAsyncTask instead of AsyncTask when removing bookmarks
Categories
(Firefox for Android Graveyard :: Awesomescreen, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 22
People
(Reporter: mfinkle, Assigned: mfinkle)
Details
Attachments
(1 file, 1 obsolete file)
|
3.08 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
When removing a bookmark we execute DB code in some background thread that is not GeckoBackgroundTread. We could easily use GeckoBackgroundThread if the code switched to GeckoAsyncTask, but it does not support "onPreExecute" so it is not a drop in replacement.
This patch adds a simple "onPreExecute" to GeckoAsyncTask and replaces AsyncTask when removing a bookmark.
Like AsyncTask, I am calling onPreExecute on whatever thread creates GeckoAsyncTask.
Attachment #715220 -
Flags: review?(bugmail.mozilla)
| Assignee | ||
Comment 1•13 years ago
|
||
Note to self: Remember to remove the AsyncTask import
Comment 2•13 years ago
|
||
Comment on attachment 715220 [details] [diff] [review]
patch
Review of attachment 715220 [details] [diff] [review]:
-----------------------------------------------------------------
So this seems wrong to me; the general contract of GeckoAsyncTask is that it behaves like AsyncTask, except that it forces the UI thread in place of "whatever random thread the task is created on and/or calls execute()". Which means that onPreExecute() should also always run on the UI thread, rather than the thread that calls execute().
Attachment #715220 -
Flags: review?(bugmail.mozilla) → review-
| Assignee | ||
Comment 3•13 years ago
|
||
This patch ensures onPreExecute is run on the UI thread
Assignee: nobody → mark.finkle
Attachment #715220 -
Attachment is obsolete: true
Attachment #715600 -
Flags: review?(bugmail.mozilla)
Comment 4•13 years ago
|
||
Comment on attachment 715600 [details] [diff] [review]
patch 2
Review of attachment 715600 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM
Attachment #715600 -
Flags: review?(bugmail.mozilla) → review+
Comment 5•13 years ago
|
||
CCing bnicholson as well since one of you will need to rebase for the s/Activity/Handler/ changes.
| Assignee | ||
Comment 6•13 years ago
|
||
Comment 7•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•