Closed
Bug 700354
Opened 14 years ago
Closed 14 years ago
Use of AsyncTask needs some cleanup.
Categories
(Firefox for Android Graveyard :: General, defect, P2)
Tracking
(firefox11 fixed, fennec11+)
RESOLVED
FIXED
People
(Reporter: dougt, Assigned: blassey)
Details
Attachments
(1 file, 1 obsolete file)
|
17.83 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
What we are seeing is that the completion callback is happening on the wrong thread. Many users are creating AsyncTasks from the Gecko thread, and then in the completion callback accessing UI elements that must only be accessed from the java thread.
| Assignee | ||
Comment 1•14 years ago
|
||
Assignee: nobody → blassey.bugs
Attachment #572511 -
Flags: review?(doug.turner)
| Assignee | ||
Updated•14 years ago
|
OS: Mac OS X → Android
Hardware: x86 → ARM
| Reporter | ||
Updated•14 years ago
|
Priority: -- → P2
| Reporter | ||
Comment 2•14 years ago
|
||
Comment on attachment 572511 [details] [diff] [review]
patch
Review of attachment 572511 [details] [diff] [review]:
-----------------------------------------------------------------
::: embedding/android/GeckoApp.java
@@ +340,4 @@
> if (!checkAndSetLaunchState(LaunchState.Launching, LaunchState.Launched))
> return false;
>
> + class GeckoThread extends Thread {
put in its own file.
::: embedding/android/Tab.java
@@ +57,5 @@
>
> +// AsyncTask runs onPostExecute on the thread it is constructed on
> +// We construct these off of the main thread, and we want that to run
> +// on the main UI thread, so this is a convenience class to do that
> +abstract class GeckoAsyncTask<Params, Progress, Result> {
move into its own file.
Attachment #572511 -
Flags: review?(doug.turner) → review-
| Assignee | ||
Comment 3•14 years ago
|
||
Attachment #572511 -
Attachment is obsolete: true
Attachment #572650 -
Flags: review?(doug.turner)
| Assignee | ||
Updated•14 years ago
|
Attachment #572650 -
Flags: review?(doug.turner) → review?(mark.finkle)
Comment 4•14 years ago
|
||
Comment on attachment 572650 [details] [diff] [review]
patch
Not sure why you wanted to move GeckoThread out of GeckoApp. I kinda liked it better as an inner class. Easier access to GeckoApp innards and less stuff exposed from GeckoApp.
Otherwise looks fine.
Attachment #572650 -
Flags: review?(mark.finkle) → review+
| Assignee | ||
Comment 5•14 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #4)
> Comment on attachment 572650 [details] [diff] [review] [diff] [details] [review]
> patch
>
> Not sure why you wanted to move GeckoThread out of GeckoApp. I kinda liked
> it better as an inner class. Easier access to GeckoApp innards and less
> stuff exposed from GeckoApp.
me too, just doing what doug asked for.
Although, with the landing of pcwalton's patch queue, nothing needs to be made any more public for this change
Comment 6•14 years ago
|
||
Brad, did you land this?
| Assignee | ||
Comment 7•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•13 years ago
|
tracking-fennec: --- → 11+
| Assignee | ||
Updated•13 years ago
|
status-firefox11:
--- → fixed
Updated•4 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
•