Closed
Bug 1136565
Opened 10 years ago
Closed 9 years ago
recovery when an unknown device connected to TCP presentation server
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: CuveeHsu, Assigned: schien)
References
Details
Attachments
(1 file, 5 obsolete files)
(deleted),
patch
|
CuveeHsu
:
review+
xeonchen
:
review+
|
Details | Diff | Splinter Review |
We should have a way to recovery when an unknown device connected to TCP presentation server. A possible way is talk to its listener to discovery again and report whether the connecter is in the discovery results.
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 1•9 years ago
|
||
Controlling device might not register itself as a mDNS device so we need to create a correspond Presentation Device on receiver side while connected.
Assignee | ||
Comment 2•9 years ago
|
||
Here is the summary of this patch:
1) move nsIPresentationDevice generation and storage from TCPPresentationServer to MDNSDeviceProvider
2) move session request event interface from nsIPresentationDeviceEventListener to nsIPresentationDeviceListener
3) TCP control channel now report incoming session request from TCPPresentationServer -> MDNSDeviceProvider -> PresentationDeviceManager
4) establishing control channel now goes from MDNSDevice -> MDNSDeviceProvider -> TCPPresentationServer
Assignee: nobody → schien
Status: NEW → ASSIGNED
Attachment #8674137 -
Flags: feedback?(xeonchen)
Attachment #8674137 -
Flags: feedback?(juhsu)
Comment 3•9 years ago
|
||
Comment on attachment 8674137 [details] [diff] [review]
bug1136565-allow-request-from-unknown-controller.patch
Review of attachment 8674137 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/presentation/provider/MulticastDNSDeviceProvider.cpp
@@ +856,5 @@
> + nsAutoCString id;
> + unused << aDeviceInfo->GetId(id);
> + uint16_t port;
> + unused << aDeviceInfo->GetPort(&port);
> +
remove trailing spaces
@@ +859,5 @@
> + unused << aDeviceInfo->GetPort(&port);
> +
> + device = new Device(id, id, EmptyCString(), host, port, DeviceState::eActive, nullptr);
> + }
> +
remove trailing space
::: dom/presentation/provider/MulticastDNSDeviceProvider.h
@@ +76,4 @@
> {
> }
>
> + const nsCString& Id() const
remove trailing space
@@ +145,5 @@
> + nsresult RequestSession(Device* aDevice,
> + const nsAString& aUrl,
> + const nsAString& aPresentationId,
> + nsIPresentationControlChannel** aRetVal);
> +
remove trailing spaces
Attachment #8674137 -
Flags: feedback?(xeonchen) → feedback+
Reporter | ||
Comment 4•9 years ago
|
||
Comment on attachment 8674137 [details] [diff] [review]
bug1136565-allow-request-from-unknown-controller.patch
Review of attachment 8674137 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm
Attachment #8674137 -
Flags: feedback?(juhsu) → feedback+
Assignee | ||
Comment 5•9 years ago
|
||
Assignee | ||
Comment 6•9 years ago
|
||
Update with test cases fixed. Will have minor modification in test case later but we can start the first review.
Attachment #8674137 -
Attachment is obsolete: true
Attachment #8674812 -
Flags: review?(xeonchen)
Attachment #8674812 -
Flags: review?(juhsu)
Assignee | ||
Comment 7•9 years ago
|
||
Assignee | ||
Comment 8•9 years ago
|
||
update with test case modification.
@seanlin, mochitest for Presentation API is modified because receiver side session creation event is moved from nsIPresentationDeviceEventListener to nsIPresentationDeviceListener.
Attachment #8674812 -
Attachment is obsolete: true
Attachment #8674812 -
Flags: review?(xeonchen)
Attachment #8674812 -
Flags: review?(juhsu)
Attachment #8675273 -
Flags: review?(xeonchen)
Attachment #8675273 -
Flags: review?(selin)
Attachment #8675273 -
Flags: review?(juhsu)
Comment 9•9 years ago
|
||
Comment on attachment 8675273 [details] [diff] [review]
bug1136565.patch
Review of attachment 8675273 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/presentation/tests/mochitest/PresentationSessionChromeScript.js
@@ +360,5 @@
> addMessageListener('trigger-incoming-session-request', function(url) {
> + var deviceManager = Cc['@mozilla.org/presentation-device/manager;1']
> + .getService(Ci.nsIPresentationDeviceManager);
> + deviceManager.QueryInterface(Ci.nsIPresentationDeviceListener)
> + .onSessionRequest(mockedDevice, url, sessionId, mockedControlChannel);
nit: function |simulateSessionRequest| (and possibly the listener setter/getter) of |mockedDevice| may also be removed.
Attachment #8675273 -
Flags: review?(selin) → review+
Assignee | ||
Comment 10•9 years ago
|
||
update according to @seanlin's comment and rebase according to RefPtr modification.
Attachment #8675273 -
Attachment is obsolete: true
Attachment #8675273 -
Flags: review?(xeonchen)
Attachment #8675273 -
Flags: review?(juhsu)
Attachment #8675494 -
Flags: review?(xeonchen)
Attachment #8675494 -
Flags: review?(juhsu)
Comment 11•9 years ago
|
||
Comment on attachment 8675494 [details] [diff] [review]
bug1136565-allow-request-from-unknown-controller.patch - v3
Review of attachment 8675494 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/presentation/provider/MulticastDNSDeviceProvider.cpp
@@ +277,5 @@
> MulticastDNSDeviceProvider::UnregisterService(nsresult aReason)
> {
> MOZ_ASSERT(NS_IsMainThread());
>
> + ClearDevices();
Per our discussion, devices should not be cleared in unregistration.
Attachment #8675494 -
Flags: review?(xeonchen)
Assignee | ||
Comment 12•9 years ago
|
||
Thanks for catching this. Patch is updated according to @xeonchen's comment.
Attachment #8675494 -
Attachment is obsolete: true
Attachment #8675494 -
Flags: review?(juhsu)
Attachment #8675524 -
Flags: review?(xeonchen)
Attachment #8675524 -
Flags: review?(juhsu)
Updated•9 years ago
|
Attachment #8675524 -
Flags: review?(xeonchen) → review+
Assignee | ||
Comment 13•9 years ago
|
||
Originally device list is maintained in TCPPresentationServer. We need to clean all device related information and rebuild it while restarting server. (That's the reason why ClearDevice() is invoked in |OnClose|, see comment #11.)
We don't need to rescan while restarting server because the device list is maintained in MDNSDeviceProvider directly.
Attachment #8675524 -
Attachment is obsolete: true
Attachment #8675524 -
Flags: review?(juhsu)
Attachment #8675980 -
Flags: review?(xeonchen)
Attachment #8675980 -
Flags: review?(juhsu)
Reporter | ||
Updated•9 years ago
|
Attachment #8675980 -
Flags: review?(juhsu) → review+
Updated•9 years ago
|
Attachment #8675980 -
Flags: review?(xeonchen) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 14•9 years ago
|
||
Keywords: checkin-needed
Comment 15•9 years ago
|
||
backout bugherder merge |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
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
•