Closed
Bug 1153159
Opened 10 years ago
Closed 10 years ago
[bluetooth2] Passing "promise" in the parameter list of |BT_ENSURE_TRUE_RESOLVE| and |BT_ENSURE_TRUE_REJECT|
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(firefox40 fixed)
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox40 | --- | fixed |
People
(Reporter: brsun, Assigned: brsun)
Details
Attachments
(1 file, 1 obsolete file)
|
25.74 KB,
patch
|
brsun
:
review+
|
Details | Diff | Splinter Review |
|BT_ENSURE_TRUE_RESOLVE|[1] and |BT_ENSURE_TRUE_REJECT|[2] assume there is always has a variable named as "promise" on the stack. Passing the promise variable through the parameter list would be better than hard-coding the variable name within the macro.
[1] https://dxr.mozilla.org/mozilla-central/source/dom/bluetooth2/BluetoothCommon.h#122
[2] https://dxr.mozilla.org/mozilla-central/source/dom/bluetooth2/BluetoothCommon.h#134
| Assignee | ||
Updated•10 years ago
|
Assignee: nobody → brsun
| Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8595728 -
Flags: review?(btian)
Comment 2•10 years ago
|
||
Comment on attachment 8595728 [details] [diff] [review]
bug1153159_bluetooth2_pass_promise_in_macro.patch
Review of attachment 8595728 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with comment addressed. Thanks!
::: dom/bluetooth/BluetoothCommon.h
@@ +130,5 @@
> do { \
> if (MOZ_UNLIKELY(!(x))) { \
> BT_API2_LOGR("BT_ENSURE_TRUE_RESOLVE(" #x ") failed"); \
> promise->MaybeResolve(ret); \
> return promise.forget(); \
Add parentheses for |promise|.
@@ +142,5 @@
> do { \
> if (MOZ_UNLIKELY(!(x))) { \
> BT_API2_LOGR("BT_ENSURE_TRUE_REJECT(" #x ") failed"); \
> promise->MaybeReject(ret); \
> return promise.forget(); \
Ditto.
Attachment #8595728 -
Flags: review?(btian) → review+
| Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8595728 -
Attachment is obsolete: true
Attachment #8596353 -
Flags: review+
| Assignee | ||
Comment 4•10 years ago
|
||
Try results seem good:
- https://treeherder.mozilla.org/#/jobs?repo=try&revision=9feacb9b8074
Keywords: checkin-needed
Comment 5•10 years ago
|
||
Keywords: checkin-needed
Comment 6•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•