Open
Bug 1474150
Opened 7 years ago
Updated 3 years ago
new TCPServerSocket should fail if port is already in use
Categories
(Core :: Networking, defect, P5)
Core
Networking
Tracking
()
NEW
People
(Reporter: irakli, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged] )
Attempt to using TCPServerSocket in WebExtensions "addon_child" context does not report report any issues even if requested port is in use. Although in such case socket does not seem to function.
I suspect issue is related to the fact that web-extensions use their own process as running same code in the privileged tab like `about:addons` seems to behave as expected - exception is thrown on attempt to instantiate server socket on port that is already in use.
Comment 1•7 years ago
|
||
Feels like a webextension topic?
Component: Networking → Untriaged
Product: Core → WebExtensions
Comment 2•7 years ago
|
||
Nope. We don't support TCPServerSocket. Irakli is using this from privileged code to try to expose an API to WebExtensions.
Component: Untriaged → Networking
Product: WebExtensions → Core
![]() |
||
Comment 3•7 years ago
|
||
I think it's because of this code:
https://searchfox.org/mozilla-central/rev/a80651653faa78fa4dfbd238d099c2aad1cec304/netwerk/base/nsServerSocket.cpp#360-362
We should make this optional, probably by adding a new flag at
https://searchfox.org/mozilla-central/rev/a80651653faa78fa4dfbd238d099c2aad1cec304/netwerk/base/nsIServerSocket.idl#37
Jason, I think we need some cross-team coordination to properly triage/prioritize this. Can you help out?
Updated•7 years ago
|
Flags: needinfo?(jduell.mcbugs) → needinfo?(dd.mozilla)
Comment 5•7 years ago
|
||
To be able to triage this properly, how important is TCPServerSocket use case?
Flags: needinfo?(dd.mozilla) → needinfo?(kmaglione+bmo)
Comment 6•7 years ago
|
||
We don't expose this interface to WebExtensions, so I don't think it's a concern.
Flags: needinfo?(kmaglione+bmo)
Comment 7•7 years ago
|
||
(In reply to Irakli Gozalishvili [:irakli] [:gozala] [@gozala] from comment #0)
> Attempt to using TCPServerSocket in WebExtensions "addon_child" context does
> not report report any issues even if requested port is in use. Although in
> such case socket does not seem to function.
>
> I suspect issue is related to the fact that web-extensions use their own
> process as running same code in the privileged tab like `about:addons` seems
> to behave as expected - exception is thrown on attempt to instantiate server
> socket on port that is already in use.
Is this blocking any work?
Flags: needinfo?(rFobic)
Reporter | ||
Comment 8•7 years ago
|
||
(In reply to Selena Deckelmann :selenamarie :selena use ni? pronoun: she from comment #7)
> (In reply to Irakli Gozalishvili [:irakli] [:gozala] [@gozala] from comment
> #0)
> > Attempt to using TCPServerSocket in WebExtensions "addon_child" context does
> > not report report any issues even if requested port is in use. Although in
> > such case socket does not seem to function.
> >
> > I suspect issue is related to the fact that web-extensions use their own
> > process as running same code in the privileged tab like `about:addons` seems
> > to behave as expected - exception is thrown on attempt to instantiate server
> > socket on port that is already in use.
>
> Is this blocking any work?
Short answer is - not right now. More elaborate answer would be:
It is a bug and as we'll get closer to landing http://github.com/mozilla/libdweb into the tree this would become a blocker. We aim that to be by end of the year.
Flags: needinfo?(rFobic)
Updated•7 years ago
|
Priority: -- → P5
Updated•7 years ago
|
Whiteboard: [necko-triaged]
Reporter | ||
Updated•6 years ago
|
Blocks: libdweb-tcp
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•