Closed
Bug 1153063
Opened 9 years ago
Closed 9 years ago
trun on logging for debug in test_tcp_control_channel.js
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: CuveeHsu, Assigned: CuveeHsu)
References
Details
Attachments
(1 file, 3 obsolete files)
5.32 KB,
patch
|
CuveeHsu
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
Per bug 1152522 comment 3, trun on logging for debug in test_tcp_control_channel.js
Assignee | ||
Comment 2•9 years ago
|
||
turn on log in mochitest and test_tcp_control_channel.js
Attachment #8590726 -
Flags: review?(fabrice)
Assignee | ||
Comment 3•9 years ago
|
||
add one more log
Attachment #8590726 -
Attachment is obsolete: true
Attachment #8590726 -
Flags: review?(fabrice)
Attachment #8590731 -
Flags: review?(fabrice)
Assignee | ||
Comment 4•9 years ago
|
||
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=37b3f367724c
Comment 5•9 years ago
|
||
Comment on attachment 8590731 [details] [diff] [review] turn-on-log Review of attachment 8590731 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/presentation/provider/TCPPresentationServer.js @@ +13,2 @@ > function log(aMsg) { > dump("-*- TCPPresentationServer.js: " + aMsg + "\n"); that should be DEBUG && dump(...); so that it applies to all calls to log() no? @@ +57,5 @@ > let serverSocketPort = (aPort !== 0) ? aPort : -1; > > this._serverSocket = Cc["@mozilla.org/network/server-socket;1"] > .createInstance(Ci.nsIServerSocket); > + nit: trailing whitespace @@ +59,5 @@ > this._serverSocket = Cc["@mozilla.org/network/server-socket;1"] > .createInstance(Ci.nsIServerSocket); > + > + if(!this._serverSocket) { > + DEBUG && log("TCPPresentationServer - create server socket fail."); and then you would not need the DEBUG here ::: modules/libpref/init/all.js @@ +4534,5 @@ > pref("dom.beforeAfterKeyboardEvent.enabled", false); > > // Presentation API > pref("dom.presentation.enabled", false); > +pref("dom.presentation.tcpServer.debug", false); We usually name prefs with snake_case, note camelCase. So that I would rather like `dom.presentation.tcp_server.debug`
Attachment #8590731 -
Flags: review?(fabrice) → review-
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #5) > Comment on attachment 8590731 [details] [diff] [review] > turn-on-log > > Review of attachment 8590731 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/presentation/provider/TCPPresentationServer.js > @@ +13,2 @@ > > function log(aMsg) { > > dump("-*- TCPPresentationServer.js: " + aMsg + "\n"); > > that should be DEBUG && dump(...); so that it applies to all calls to log() > no? > > @@ +59,5 @@ > > this._serverSocket = Cc["@mozilla.org/network/server-socket;1"] > > .createInstance(Ci.nsIServerSocket); > > + > > + if(!this._serverSocket) { > > + DEBUG && log("TCPPresentationServer - create server socket fail."); > > and then you would not need the DEBUG here > If we change the position of |DEBUG|, |log| will evaluate its parameter and be time-consuming since lots of |JSON.stringify| like here: https://dxr.mozilla.org/mozilla-central/source/dom/presentation/provider/TCPPresentationServer.js#182 Is that OK?
Flags: needinfo?(fabrice)
Comment 7•9 years ago
|
||
Right, you just added a missing one. Let's only change the pref name then!
Flags: needinfo?(fabrice)
Assignee | ||
Comment 8•9 years ago
|
||
Modify by review comments https://treeherder.mozilla.org/#/jobs?repo=try&revision=3e59178340f2
Attachment #8590731 -
Attachment is obsolete: true
Attachment #8592606 -
Flags: review?(fabrice)
Comment 9•9 years ago
|
||
Comment on attachment 8592606 [details] [diff] [review] turn-on-log Review of attachment 8592606 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/presentation/provider/TCPPresentationServer.js @@ +58,5 @@ > > this._serverSocket = Cc["@mozilla.org/network/server-socket;1"] > .createInstance(Ci.nsIServerSocket); > + > + if(!this._serverSocket) { nit: if (...)
Attachment #8592606 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 10•9 years ago
|
||
Modify nit, carry r+ Thanks Fabrice!
Attachment #8592606 -
Attachment is obsolete: true
Attachment #8592608 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 11•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/05e29a28737a
Keywords: checkin-needed
Comment 12•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/05e29a28737a
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
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
•