Closed
Bug 1121970
Opened 9 years ago
Closed 9 years ago
debug output from printf_stderr gets clipped on Windows
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: jimm, Assigned: jimm)
Details
Attachments
(1 file, 1 obsolete file)
1.47 KB,
patch
|
Details | Diff | Splinter Review |
![]() |
Assignee | |
Comment 1•9 years ago
|
||
![]() |
Assignee | |
Updated•9 years ago
|
Attachment #8550255 -
Flags: review?(benjamin)
Comment 2•9 years ago
|
||
Comment on attachment 8550255 [details] [diff] [review] patch Please at least use nsAutoArrayPtr<char> instead of the manual new/delete. I feel like there has to be a better way here, but I'm not thinking of it offhand.
Attachment #8550255 -
Flags: review?(benjamin) → review?(nfroyd)
![]() |
||
Comment 3•9 years ago
|
||
Comment on attachment 8550255 [details] [diff] [review] patch Review of attachment 8550255 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the changes below. ::: xpcom/glue/nsCRTGlue.cpp @@ +340,5 @@ > if (IsDebuggerPresent()) { > + int lengthNeeded = _vscprintf(aFmt, aArgs); > + if (lengthNeeded) { > + lengthNeeded++; > + char* buf = new char[lengthNeeded]; Please use mozilla::UniquePtr (mozilla/UniquePtr.h) here. Bonus points if you use MakeUnique: auto buf = MakeUnique<char[]>(lengthNeeded); @@ +348,5 @@ > + vsnprintf(buf, lengthNeeded, aFmt, argsCpy); > + buf[lengthNeeded - 1] = '\0'; > + va_end(argsCpy); > + OutputDebugStringA(buf); > + delete [] buf; ...and then you don't need this. @@ +350,5 @@ > + va_end(argsCpy); > + OutputDebugStringA(buf); > + delete [] buf; > + } > + } Nit: trailing whitespace.
Attachment #8550255 -
Flags: review?(nfroyd) → review+
![]() |
Assignee | |
Comment 4•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9eb15c8bfabb
![]() |
Assignee | |
Comment 5•9 years ago
|
||
Attachment #8550255 -
Attachment is obsolete: true
![]() |
Assignee | |
Updated•9 years ago
|
Keywords: checkin-needed
Comment 6•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/768f1c9ea4a1
Keywords: checkin-needed
Comment 7•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/768f1c9ea4a1
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•