Closed
Bug 1016196
Opened 11 years ago
Closed 10 years ago
Add Promise support in BluetoothReplyRunnable
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: yrliou, Assigned: ben.tian)
References
Details
(Whiteboard: webbt-api)
Attachments
(2 files, 4 obsolete files)
11.60 KB,
patch
|
echou
:
review+
|
Details | Diff | Splinter Review |
5.79 KB,
patch
|
echou
:
review+
|
Details | Diff | Splinter Review |
Need to revise BluetoothReplyRunnable because we use Promise instead of DOM request in WebBluetoothAPIv2.
Reporter | ||
Updated•11 years ago
|
Whiteboard: webbt-api
Assignee | ||
Comment 1•11 years ago
|
||
Assignee: nobody → btian
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Depends on: webbt-api-onoff
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8429962 -
Attachment is obsolete: true
Attachment #8429964 -
Attachment is obsolete: true
Attachment #8434634 -
Flags: review?(echou)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8434635 -
Flags: review?(echou)
Reporter | ||
Comment 5•10 years ago
|
||
According to Bug1016560, Promise::MaybeReject() only accept nsresult and do not accept nsString anymore.
Assignee | ||
Comment 6•10 years ago
|
||
Rebase on Bug 1016560 to reject with NS_ERROR_DOM_OPERATION_ERR always.
Attachment #8434634 -
Attachment is obsolete: true
Attachment #8434634 -
Flags: review?(echou)
Attachment #8440549 -
Flags: review?(echou)
Assignee | ||
Comment 7•10 years ago
|
||
Attachment #8434635 -
Attachment is obsolete: true
Attachment #8434635 -
Flags: review?(echou)
Attachment #8440551 -
Flags: review?(echou)
Comment 8•10 years ago
|
||
Comment on attachment 8440549 [details] [diff] [review]
Patch 1/2 (v2): Add Promise support in BluetoothReplyRunnable
Review of attachment 8440549 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with questions answered.
::: dom/bluetooth2/BluetoothReplyRunnable.cpp
@@ +110,5 @@
>
> ReleaseMembers();
> MOZ_ASSERT(!mDOMRequest,
> + "mDOMRequest is still alive! Deriving class should call "
> + "BluetoothReplyRunnable::ReleaseMembers()!");
I don't really get this design. In fact we can just set mDOMRequest / mPromise to nullptr right before calling ReleaseMembers() instead of placing assertions here. Do I miss something?
Attachment #8440549 -
Flags: review?(echou) → review+
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to Eric Chou [:ericchou] [:echou] (GSMA MAE @ Shanghai, 6/10 ~ 6/13) from comment #8)
> ::: dom/bluetooth2/BluetoothReplyRunnable.cpp
> @@ +110,5 @@
> >
> > ReleaseMembers();
> > MOZ_ASSERT(!mDOMRequest,
> > + "mDOMRequest is still alive! Deriving class should call "
> > + "BluetoothReplyRunnable::ReleaseMembers()!");
>
> I don't really get this design. In fact we can just set mDOMRequest /
> mPromise to nullptr right before calling ReleaseMembers() instead of placing
> assertions here. Do I miss something?
[1] still requires |ReleaseMembers| to revoke |BluetoothRequestParent::ReplyRunnable|. Let me check if we can bypass it.
[1] http://dxr.mozilla.org/mozilla-central/source/dom/bluetooth/ipc/BluetoothParent.cpp#62
Updated•10 years ago
|
Attachment #8440551 -
Flags: review?(echou) → review+
Assignee | ||
Comment 10•10 years ago
|
||
(In reply to Ben Tian [:btian] from comment #9)
> http://dxr.mozilla.org/mozilla-central/source/dom/bluetooth/ipc/
> BluetoothParent.cpp#62
|ReleaseMember| is required as |Revoke| needs a function to reset member variables w/o destructing it. I'll keep the patch unchanged.
Assignee | ||
Comment 11•10 years ago
|
||
Comment 12•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1b7b1652de28
https://hg.mozilla.org/mozilla-central/rev/7a428e1bb7c1
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•