Fix setScreenBrightness assertion failure because ScreenManager._savedBrightness is undefined

VERIFIED FIXED

Status

Firefox OS
Gaia
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: cpeterson, Assigned: cpeterson)

Tracking

({regression})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
Created attachment 673997 [details] [diff] [review]
fix-setScreenBrightness-assertion.patch

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
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Updated

5 years ago
Duplicate of this bug: 804677

Comment 7

5 years ago
Device: Unagi
Build: 20130102070202

Does not reproduce on this device and build. Saved brightness is defined

Updated

5 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.