Closed
Bug 834642
Opened 12 years ago
Closed 12 years ago
Kill Browser from card view won't unregister (sensor) observers
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Tracking
(blocking-b2g:tef+, b2g18 fixed, b2g18-v1.0.1 fixed)
VERIFIED
FIXED
blocking-b2g | tef+ |
People
(Reporter: alan.yenlin.huang, Assigned: cyu)
References
Details
Attachments
(1 file)
Killer Browser from card view won't unregister (sensor) observers. This would cause many sensor device keep doing unnecessary task (battery drop) and would cause leakage.
[Note]
** Browser is in outOfProcessBlackList of window_manager.js.
** Browser content tab is OOP, so that plugin-container process could be killed via card view.
[Reproduce step]
Launch browser on unagi, then kill browser via card view. We use "adb shell getevent" to see that we didn't unregister /dev/input/event4.
[What happened?]
When killing a content process via card view, mozilla::hal_sandbox::HalParent::ActorDestroy would try to unregister all observers. But due to mentioned in [Note], object "this" is different with the observer added to observerlist when register that observer. I think that's why we cannot unregister them in this case. Below are the log I added:
BUG : + SENSOR_ORIENTATION +, mozilla::hal::RegisterSensorObserver:551
BUG : void mozilla::ObserverList<T>::AddObserver(mozilla::Observer<T>*) [with T = mozilla::hal::SensorData]:50, Length()=0, add 0x45b15320
BUG : virtual void mozilla::hal_sandbox::HalParent::ActorDestroy(mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>::ActorDestroyReason):418, aWhy=3, this=0x48975c80
BUG : - SENSOR_ORIENTATION -, mozilla::hal::UnregisterSensorObserver:568
BUG : bool mozilla::ObserverList<T>::RemoveObserver(mozilla::Observer<T>*) [with T = mozilla::hal::SensorData]:60, Length()=1, remove 0x48975ca0
BUG : !observers.RemoveObserver(aObserver), mozilla::hal::UnregisterSensorObserver:571
Reporter | ||
Updated•12 years ago
|
Summary: Killer Browser from card view won't unregister (sensor) observers → Kill Browser from card view won't unregister (sensor) observers
Assignee | ||
Comment 1•12 years ago
|
||
The problem is in showCardSwitcher() in cards_view.js
// Make sure we're in portrait mode
screen.mozLockOrientation('portrait');
It should be 'portrait-primary'. 'portrait' allows 2 orientations so the sensor observer is enabled.
Another side effect is that after coming back to the home screen from cards view, you may play with the home screen with the phone rotated 180 degrees, but entering and exiting an app with locked orientation fixes the error.
Assignee | ||
Comment 2•12 years ago
|
||
Assignee: nobody → cyu
Attachment #710100 -
Flags: review?(timdream)
Assignee | ||
Updated•12 years ago
|
Component: General → Gaia::System
Comment 3•12 years ago
|
||
Comment on attachment 710100 [details]
Pointer to Gaia PR
r+, typo fix.
Attachment #710100 -
Flags: review?(timdream) → review+
Comment 4•12 years ago
|
||
Merged in https://github.com/mozilla-b2g/gaia/commit/1ece84370cd6d9c70af7e9214a4ec9280134800c for master
Are we uplift this into v1-train or v1.0.0 ~?
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 6•12 years ago
|
||
Tim - this was requested by a partner in bug 852039. Can you help tef? triage understand risk, for context?
blocking-b2g: --- → tef?
Flags: needinfo?(timdream)
Comment 7•12 years ago
|
||
This one is very low-risky and is a bug existed long ago. We should fix/uplift this.
Flags: needinfo?(timdream)
Updated•12 years ago
|
Comment 8•12 years ago
|
||
Uplifted commit 1ece84370cd6d9c70af7e9214a4ec9280134800c as:
v1-train: ea55ca3e36c16cbd6f183b6d1abc918ee1d1471f
v1.0.1: 41c389686ae8a5d8d441f302c405043a8ac9bdf5
The issue appears to be fixed on v1.1 and v1.0.1 builds.
Environmental Variables:
Unagi Build ID: 20130409070205
Kernel Date: Dec 5
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/56c922308fd1
Gaia: 0a9f78bffafda93a159c1f502e8b110c2f49a500
Killer Browser from card view is unregistered.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•