Closed
Bug 1027552
Opened 10 years ago
Closed 10 years ago
Align values in BluetoothAttributeEvent.attrs with webidl
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.0 S5 (4july)
People
(Reporter: yrliou, Assigned: yrliou)
References
Details
(Whiteboard: webbt-api)
Attachments
(1 file, 3 obsolete files)
Align the character cases with webidl enumeration.
Assignee | ||
Comment 1•10 years ago
|
||
This patch convert the value to lowercase to align with webidl enumeration definition.
Attachment #8442720 -
Flags: review?(btian)
Comment 2•10 years ago
|
||
Comment on attachment 8442720 [details] [diff] [review] Bug 1027552 - Patch : Align values in BluetoothAttributeEvent.attrs with webidl Review of attachment 8442720 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bluetooth2/BluetoothAdapter.cpp @@ +840,2 @@ > if (IsAdapterAttributeChanged(type, arr[i].value())) { > SetPropertyByValue(arr[i]); nit: newline here to separate |SetPropertyByValue| and appending lower-cased attribute name. @@ +840,4 @@ > if (IsAdapterAttributeChanged(type, arr[i].value())) { > SetPropertyByValue(arr[i]); > + ToLowerCase(arr[i].name(), name); > + types.AppendElement(name); Only the first character instead of whole string should be lower-cased, even though current attributes are all single word.
Assignee | ||
Comment 3•10 years ago
|
||
* Define a macro for converting web enum values to strings
Attachment #8442720 -
Attachment is obsolete: true
Attachment #8442720 -
Flags: review?(btian)
Assignee | ||
Updated•10 years ago
|
Attachment #8443223 -
Flags: review?(btian)
Assignee | ||
Updated•10 years ago
|
Whiteboard: webbt-api
Comment 4•10 years ago
|
||
Comment on attachment 8443223 [details] [diff] [review] Bug 1027552 - Patch(v2) : Align values in BluetoothAttributeEvent.attrs with webidl Review of attachment 8443223 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bluetooth2/BluetoothCommon.h @@ +90,5 @@ > + uint32_t index = uint32_t(_enum); \ > + _string.AssignASCII(_enumType##Values::strings[index].value, \ > + _enumType##Values::strings[index].length); \ > +} > + Also append to array in this marco since the string is always appended to an array afterwards. And use |do {...} while(0)| for macro of multiple lines.
Assignee | ||
Comment 5•10 years ago
|
||
Hi Ben, Thanks for your comment! I have updated the patch to address them. Thanks, Jocelyn
Attachment #8443223 -
Attachment is obsolete: true
Attachment #8443223 -
Flags: review?(btian)
Attachment #8443262 -
Flags: review?(btian)
Updated•10 years ago
|
Blocks: webbt-test-onoff
Comment 6•10 years ago
|
||
Comment on attachment 8443262 [details] [diff] [review] Bug 1027552 - Patch(v3) : Align values in BluetoothAttributeEvent.attrs with webidl Review of attachment 8443262 [details] [diff] [review]: ----------------------------------------------------------------- r=me. Thanks.
Attachment #8443262 -
Flags: review?(btian) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Thanks for your time, Ben!
Attachment #8443262 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 8•10 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/58d386cbfe55
Keywords: checkin-needed
Comment 9•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/58d386cbfe55
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S5 (4july)
You need to log in
before you can comment on or make changes to this bug.
Description
•