Closed Bug 804328 Opened 12 years ago Closed 12 years ago

Fix setScreenBrightness assertion failure because ScreenManager._savedBrightness is undefined

Categories

(Firefox OS Graveyard :: Gaia, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

(Keywords: regression)

Attachments

(1 file)

STR:
1. Launch B2GDebug.app build
2. On lock screen, press HOME key

RESULT:
PowerManager.cpp asserts because ScreenManager._savedBrightness is undefined:

SetScreenBrightness(nan)
[Parent 7718] WARNING: NS_ENSURE_TRUE(0 <= aBrightness && aBrightness <= 1) failed: file /Users/cpeterson/Code/mozilla/b2g/central/dom/power/PowerManager.cpp, line 157

This is a recent regression from bug 803951.
This PowerManager.cpp assertion failure is a regression from bug 803951. ScreenManager._savedBrightness is read before it is defined.


NOTE: If blocking-basecamp+ is set, just land it for now.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: 
Testing completed: 
Risk to taking this patch (and alternatives if risky):
Attachment #673997 - Flags: review?(21)
Attachment #673997 - Flags: approval-gaia-master?(21)
Comment on attachment 673997 [details] [diff] [review]
fix-setScreenBrightness-assertion.patch

Review of attachment 673997 [details] [diff] [review]:
-----------------------------------------------------------------

I believe this is a kind of followup of Andreas patch.

One liner. a=me.
Attachment #673997 - Flags: review?(21)
Attachment #673997 - Flags: review+
Attachment #673997 - Flags: approval-gaia-master?(21)
Attachment #673997 - Flags: approval-gaia-master+
https://github.com/mozilla-b2g/gaia/pull/5958

merged, what are you waiting for?! :)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Device: Unagi
Build: 20130102070202

Does not reproduce on this device and build. Saved brightness is defined
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: