Fix build of AudioManager.cpp on gonk-JB

RESOLVED FIXED

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mwu, Assigned: mwu)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
Created attachment 765713 [details] [diff] [review]
Fix AudioManager.cpp

Doing logical AND on nsresults is not permitted.
Attachment #765713 - Flags: review?(mchen)

Comment 1

5 years ago
Comment on attachment 765713 [details] [diff] [review]
Fix AudioManager.cpp

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

::: dom/system/gonk/AudioManager.cpp
@@ +284,4 @@
>  
>    nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
>    NS_ENSURE_TRUE_VOID(obs);
> +  nsresult rv = obs->AddObserver(this, BLUETOOTH_SCO_STATUS_CHANGED_ID, false);

If rv is used to check in NS_FAILED(), maybe we can put entire function into NS_FAILED directly.
Same in obs->RemoveObserver().
Attachment #765713 - Flags: review?(mchen) → review+

Comment 2

5 years ago
Thanks for fixing this compile error.
(Assignee)

Comment 3

5 years ago
Created attachment 765779 [details] [diff] [review]
Fix AudioManager.cpp, v2
Attachment #765713 - Attachment is obsolete: true
Thanks, mwu. :)

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/4ec6133f6ed4
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.