Closed
Bug 802130
Opened 11 years ago
Closed 10 years ago
Rename GeckoAppShell.getHandler to GeckoAppShell.getBackgroundHandler
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 22
People
(Reporter: kats, Assigned: kats)
References
Details
Attachments
(4 files, 4 obsolete files)
26.30 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
51.96 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
74.56 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
6.16 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
For clarity.
Comment 1•11 years ago
|
||
kats, here are some WIP patches I had sitting around. They are probably bitrotted and incomplete, but I'm including them for reference or feedback.
Updated•11 years ago
|
Attachment #671892 -
Attachment is patch: true
Comment 2•11 years ago
|
||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Assignee | ||
Comment 5•11 years ago
|
||
Thanks for the patches! Were there any known issues you ran into?
Comment 6•11 years ago
|
||
I don't remember any issues, but I haven't tested the patches recently. They were a quick WIP, so feel free to cherry pick bits or rewrite them as you see fit. I renamed references to "MainThread" to the (hopefully) less ambiguous "UiThread".
Assignee | ||
Comment 7•10 years ago
|
||
Assignee: nobody → bugmail.mozilla
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #671892 -
Attachment is obsolete: true
Attachment #671893 -
Attachment is obsolete: true
Attachment #671894 -
Attachment is obsolete: true
Attachment #671895 -
Attachment is obsolete: true
Assignee | ||
Comment 9•10 years ago
|
||
Assignee | ||
Comment 10•10 years ago
|
||
Assignee | ||
Comment 11•10 years ago
|
||
Try build with these patches at https://tbpl.mozilla.org/?tree=Try&rev=981f1dc8303f
Assignee | ||
Comment 12•10 years ago
|
||
Comment on attachment 725000 [details] [diff] [review] Part 1 - Move assertOnThread functions to a new ThreadUtils class Try run looks green, and I don't think I screwed anything up based on local testing.
Attachment #725000 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 13•10 years ago
|
||
Comment on attachment 725001 [details] [diff] [review] Part 2 - Move mMainHandler to ThreadUtils I plan on removing the trailing newlines on landing.
Attachment #725001 -
Flags: review?(mark.finkle)
Assignee | ||
Updated•10 years ago
|
Attachment #725002 -
Flags: review?(mark.finkle)
Assignee | ||
Updated•10 years ago
|
Attachment #725004 -
Flags: review?(mark.finkle)
Comment 14•10 years ago
|
||
Comment on attachment 725000 [details] [diff] [review] Part 1 - Move assertOnThread functions to a new ThreadUtils class >diff --git a/mobile/android/base/GeckoApp.java b/mobile/android/base/GeckoApp.java >+ ThreadUtils.setUiThread(Thread.currentThread()); I am a bit ignorant on how threads and activities are associated, but I wonder if the thread could change in those situations where the activity is killed and restarted? Would it be simpler to just use: Looper.getMainLooper().getThread() when we need to check against the main thread? Just asking, I have no idea really. Even if the thread doesn't change, maybe we could init the UI thread inside ThreadUtils using the Looper method and not need to pass it in. > sGeckoThread = new GeckoThread(intent, passedUri); >+ ThreadUtils.setGeckoThread(sGeckoThread); Ah, there is some symmetry in having setXxxThread methods. Should all access to the Gecko thread happen from ThreadUtils? Just wondering if we could remove it from GeckoApp --- You might be able to remove the | import ...GeckoApp; | from some of these files. I didn't really check myself. Maybe Brian will using Eclipse!
Attachment #725000 -
Flags: review?(mark.finkle) → review+
Comment 15•10 years ago
|
||
Comment on attachment 725002 [details] [diff] [review] Part 3 - Move GeckoAppShell.getHandler() to ThreadUtils.getBackgroundHandler() Wow, we use the background thread a lot. Maybe once we figure out these Sqlite locking issues, we could look at using a simple pool of background threads. I am getting ahead of myself though.
Attachment #725002 -
Flags: review?(mark.finkle) → review+
Updated•10 years ago
|
Attachment #725004 -
Flags: review?(mark.finkle) → review+
Comment 16•10 years ago
|
||
Comment on attachment 725001 [details] [diff] [review] Part 2 - Move mMainHandler to ThreadUtils Really makes things more understandable! Nice removal of the unused GeckoHandler
Attachment #725001 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 17•10 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #14) > >+ ThreadUtils.setUiThread(Thread.currentThread()); > > I am a bit ignorant on how threads and activities are associated, but I > wonder if the thread could change in those situations where the activity is > killed and restarted? Would it be simpler to just use: > Looper.getMainLooper().getThread() when we need to check against the main > thread? > > Just asking, I have no idea really. Even if the thread doesn't change, maybe > we could init the UI thread inside ThreadUtils using the Looper method and > not need to pass it in. I don't think the thread does change in practice, but even if it does change theoretically, setting it every time we execute onCreate(), which is what the patch does, should make sure it's always correct. I could probably also use Looper.getMainLooper().getThread() though - I might do that in another round of cleanups I'm thinking about. > Ah, there is some symmetry in having setXxxThread methods. Should all access > to the Gecko thread happen from ThreadUtils? Just wondering if we could > remove it from GeckoApp I would like to do that, but currently ThreadUtils is built in the util/ folder which is built before the rest of the code (except mozglue). So I can't reference GeckoThread directly in ThreadUtils, I can only reference it as "Thread". Moving sGeckoThread out of GeckoApp is also something I want to do in a future round of cleanups.
Assignee | ||
Comment 18•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a08bb4602689 https://hg.mozilla.org/integration/mozilla-inbound/rev/1ebda01226c8 https://hg.mozilla.org/integration/mozilla-inbound/rev/418eea6b1963 https://hg.mozilla.org/integration/mozilla-inbound/rev/0ba5f40a0340
Comment 19•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a08bb4602689 https://hg.mozilla.org/mozilla-central/rev/1ebda01226c8 https://hg.mozilla.org/mozilla-central/rev/418eea6b1963 https://hg.mozilla.org/mozilla-central/rev/0ba5f40a0340
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Updated•3 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
•