Closed
Bug 920586
Opened 11 years ago
Closed 11 years ago
Allows chrome usages of TCPSocket
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(1 file)
1.66 KB,
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
For the Fx OS Simulator addon, we are using TCPSocket as an xpcom: let TCPSocket = Cc["@mozilla.org/tcp-socket;1"] .createInstance(Ci.nsIDOMTCPSocket); let socket = TCPSocket.open("127.0.0.1", 5037, {}); But the thing is that, in order to do that, we are toggling the dom.mozTCPSocket.enabled pref, that also enables it for content. If I remember correctly nsIDOMGlobalPropertyInitializer behavior, given that we returns null in `init` method when the pref is false, we shouldn't need to disable open and listen methods as mozTCPSocket will be null or undefined in content.
Assignee | ||
Comment 1•11 years ago
|
||
Here is a patch to remove the two checks in open and listen, but I'm also fine keeping checks as soon as we can somehow toggle chrome usage without enabling content one.
Assignee | ||
Updated•11 years ago
|
Attachment #809950 -
Flags: review?(bent.mozilla)
Comment 2•11 years ago
|
||
>as soon as we can somehow toggle chrome usage without enabling content one.
Move to WebIDL? ;)
Comment 3•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #2) > >as soon as we can somehow toggle chrome usage without enabling content one. > > Move to WebIDL? ;) Yes, seriously!
Assignee | ||
Comment 4•11 years ago
|
||
Hum sure, WebIDL, but it sounds way more complex than removing 4 lines :p It's not very clear what is the state of bug 885982. The patch is most likely bitrot, but is it really about only keeping test_tcpsocket_ipc.js in some way or another? (It looks like we should just be doing a mochitest-plain, don't we? Mochitest-plain would run in a child on b2g.) I can surely give a hand about testing, as I have some background on mochitests and b2g, but what concerns me is that I'd need to uplift to aurora... I'm not sure the move to WebIDL is a good candidate for uplift.
Comment 5•11 years ago
|
||
Yes, if you need to uplift then "use WebIDL" is not viable.
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 809950 [details] [diff] [review] Allows chrome usages bent looks busy, trying another potential review for this file.
Attachment #809950 -
Flags: review?(bent.mozilla) → review?(josh)
Updated•11 years ago
|
Attachment #809950 -
Flags: review?(josh) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → poirot.alex
Comment 7•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7dbd88b7f43b
Status: NEW → ASSIGNED
Keywords: checkin-needed
Comment 8•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7dbd88b7f43b
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•