Closed
Bug 1301259
Opened 8 years ago
Closed 8 years ago
[Presentation WebAPI] close the existing transport first before reconnect while in connected state.
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: schien, Assigned: kershaw)
References
Details
(Whiteboard: [ETA 9/16])
Attachments
(2 files, 2 obsolete files)
27.15 KB,
patch
|
kershaw
:
review+
|
Details | Diff | Splinter Review |
30.70 KB,
patch
|
kershaw
:
review+
|
Details | Diff | Splinter Review |
https://w3c.github.io/presentation-api/#reconnecting-to-a-presentation We should close the existing session transport before initiating reconnect procedure while the session info is already in connected state.
Reporter | ||
Updated•8 years ago
|
Whiteboard: [ETA 9/16]
Assignee | ||
Comment 1•8 years ago
|
||
Summary: 1. Close the connected connection during reconnect phase 2. Introduce PresentationSessionTransportIPC to close the data channel in the content process. 3. Separate |mSessionInfos| in PresentationIPCService into two tables for controller and receiver. Please have a look. Thanks.
Assignee: nobody → kechang
Attachment #8791111 -
Flags: feedback?(schien)
Reporter | ||
Comment 2•8 years ago
|
||
Comment on attachment 8791111 [details] [diff] [review] patch - v1 Review of attachment 8791111 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/presentation/PresentationCallbacks.cpp @@ +112,5 @@ > if (mConnection) { > + mConnection->NotifyStateChange( > + mSessionId, > + nsIPresentationSessionListener::STATE_CONNECTING, > + NS_OK); Need update state to |CLOSED| in NotifyError. ::: dom/presentation/PresentationService.h @@ +26,5 @@ > > +class PresentationService final > + : public nsIPresentationService > + , public nsIObserver > + , public PresentationServiceBase<PresentationSessionInfo> nit: align the longest one to column 80. ::: dom/presentation/PresentationServiceBase.h @@ +6,5 @@ > > #ifndef mozilla_dom_PresentationServiceBase_h > #define mozilla_dom_PresentationServiceBase_h > > +#include "nsIPresentationService.h" nit: follow alphabetical order of file name. ::: dom/presentation/PresentationSessionInfo.cpp @@ +522,5 @@ > if (mState != nsIPresentationSessionListener::STATE_CONNECTING) { > return NS_ERROR_FAILURE; > } > > + if (NS_WARN_IF(!transport)) { s/transport/aTransport @@ +1042,5 @@ > + // If |mState| is connecting, just close the connection and start > + // doing reconnect. > + if (mState == nsIPresentationSessionListener::STATE_CONNECTING) { > + NS_WARN_IF(NS_FAILED( > + Close(NS_OK, nsIPresentationSessionListener::STATE_CLOSED))); You'll need to pending reconnect procedure until |NotifyDisconnect|. @@ +1253,5 @@ > return rv; > } > > // The session transport is managed by content process > + if (NS_WARN_IF(!transport)) { s/transport/aTransport ::: dom/presentation/ipc/PresentationBuilderParent.cpp @@ +252,3 @@ > > + if (callback) { > + callback->NotifyTransportReady(); |NotifyTransportReady| should be called in PresentationSessionTransportIPC::SetCallback.
Attachment #8791111 -
Flags: feedback?(schien) → feedback+
Assignee | ||
Comment 3•8 years ago
|
||
Address the previous comments. Please take a look. Thanks.
Attachment #8791111 -
Attachment is obsolete: true
Attachment #8794738 -
Flags: review?(bugs)
Comment 4•8 years ago
|
||
Comment on attachment 8794738 [details] [diff] [review] patch - v2 Would have been nice to split this kind of patch to two. One doing the code move to the base class thingie, and then another patch making functionality changes.
Attachment #8794738 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 5•8 years ago
|
||
(In reply to Olli Pettay [:smaug] (reviewing overload) from comment #4) > Comment on attachment 8794738 [details] [diff] [review] > patch - v2 > > Would have been nice to split this kind of patch to two. One doing the code > move to the base class thingie, and then another patch making functionality > changes. Thanks for the review. I'll split the patch as you described.
Assignee | ||
Comment 6•8 years ago
|
||
Carry reviewer's name.
Attachment #8794738 -
Attachment is obsolete: true
Attachment #8796021 -
Flags: review+
Assignee | ||
Comment 7•8 years ago
|
||
Attachment #8796023 -
Flags: review+
Assignee | ||
Comment 8•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9cc10782187c
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/c572919bea35 Part1: Move session info structures to PresentationServiceBase class, r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/f8797c707348 Part2: Close the connected/connecting connection before starting reconnecting, r=smaug
Keywords: checkin-needed
Comment 10•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c572919bea35 https://hg.mozilla.org/mozilla-central/rev/f8797c707348
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•