Closed
Bug 1123536
Opened 11 years ago
Closed 11 years ago
Use NS_WARN_IF() while doing Convert() in BluetoothHALHelpers.
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: brsun, Assigned: wiwang)
Details
(Whiteboard: good first bug)
It would be better to use |NS_WARN_IF()| in each |Convert()| while checking valid values.
Comment 1•11 years ago
|
||
(In reply to Bruce Sun [:brsun] from comment #0)
> It would be better to use |NS_WARN_IF()| in each |Convert()| while checking
> valid values.
You should call NS_WARN_IF around the actual test that fails, not every single call to Convert. That would just put tons of noise into the log.
If you want a more meaningful error message, add some logging to say which command, response or notification failed.
| Reporter | ||
Comment 2•11 years ago
|
||
(In reply to Bruce Sun [:brsun] from comment #0)
> It would be better to use |NS_WARN_IF()| in each |Convert()| while checking
> valid values.
The wordings in comment 0 should be rephrased as following:
...to use |NS_WARN_IF()| in each |Convert()| while checking INVALID values.
Comment 3•11 years ago
|
||
Is there anything missing? I wasn't aware of that.
| Reporter | ||
Comment 4•11 years ago
|
||
For example:
- with |NS_WARN_IF()| https://dxr.mozilla.org/mozilla-central/source/dom/bluetooth/bluedroid/BluetoothHALHelpers.h#777
- without |NS_WARN_IF()|: https://dxr.mozilla.org/mozilla-central/source/dom/bluetooth/bluedroid/BluetoothHALHelpers.h#54
Comment 5•11 years ago
|
||
I see. I probably didn't take logging serious in the beginning. :(
I'm not sure is it's worth fixing it. HAL is going away soon. I wouldn't expect it to be present in v3.
(In reply to Thomas Zimmermann [:tzimmermann] [:tdz] from comment #5)
> I see. I probably didn't take logging serious in the beginning. :(
>
> I'm not sure is it's worth fixing it. HAL is going away soon. I wouldn't
> expect it to be present in v3.
Maybe this will be a good-first-bug for new hire.
Assignee: nobody → wiwang
Updated•11 years ago
|
Whiteboard: good first bug
Comment 7•11 years ago
|
||
Resolved as WFM since bug 1187872 removes HAL backend.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•