Closed
Bug 619670
Opened 14 years ago
Closed 13 years ago
onLowMemory may not work on Android
Categories
(Core Graveyard :: Widget: Android, defect)
Tracking
(fennec2.0+)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
fennec | 2.0+ | --- |
People
(Reporter: m_kato, Assigned: m_kato)
References
()
Details
Attachments
(1 file, 1 obsolete file)
3.57 KB,
patch
|
blassey
:
review+
|
Details | Diff | Splinter Review |
Java_org_mozilla_gecko_GeckoAppShell_onLowMemory is called from DalvikVM thread. But NotifyObservers only works on XUL main thread (in other word, NS_IsMainThread() == TRUE). So onLowMemory may not work on Android.
Updated•14 years ago
|
tracking-fennec: --- → 2.0+
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: nobody → m_kato
Status: NEW → ASSIGNED
Assignee | ||
Updated•14 years ago
|
Attachment #498970 -
Flags: review?(doug.turner)
Comment 2•14 years ago
|
||
Comment on attachment 498970 [details] [diff] [review]
fix v1
The behavior of nsAppShell::NotifyObservers() is going to be different depending on if you are on the main thread or not. If you are on the main thread, you will directly call nsIObserverService::NotifyObservers. This call will enumerate all listeners and synchronously call Observe. In the non-main-thread case, nsAppShell::NotifyObservers() will simple post an event and immediately return.
I think I would prefer that you make nsAppShell::NotifyObservers just post events regardless of which thread it is called on.
Otherwise looks fine.
Attachment #498970 -
Flags: review?(doug.turner) → review-
Comment 3•14 years ago
|
||
Attachment #498970 -
Attachment is obsolete: true
Attachment #501197 -
Flags: review?(blassey.bugs)
Updated•14 years ago
|
Attachment #501197 -
Flags: review?(blassey.bugs) → review+
Comment 4•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 5•13 years ago
|
||
onLowMemory still doesn't work on this test case:
http://crazybugs.ivank.net/
See bug 736436
Comment 6•13 years ago
|
||
Hm, though, that is not our fault, it's android who fails to notify us. re-closing. will file a separate bug.
Status: REOPENED → RESOLVED
Closed: 14 years ago → 13 years ago
Resolution: --- → FIXED
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•