Last Comment Bug 695685 - dump in JS modules/components goes to stderr and doesn't flush
: dump in JS modules/components goes to stderr and doesn't flush
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla10
Assigned To: Ted Mielczarek [:ted.mielczarek]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-19 07:12 PDT by Ted Mielczarek [:ted.mielczarek]
Modified: 2011-10-25 18:00 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Make JS module/component dump go to stdout and flush (1.07 KB, patch)
2011-10-19 07:26 PDT, Ted Mielczarek [:ted.mielczarek]
mrbkap: review+
Details | Diff | Review

Description Ted Mielczarek [:ted.mielczarek] 2011-10-19 07:12:19 PDT
If you call dump() in a JS module or component, it goes to stderr, and doesn't flush stderr. If you call dump() in a window context or a frame script, it goes to stdout and does flush stdout. This is crazy.
Comment 1 Ted Mielczarek [:ted.mielczarek] 2011-10-19 07:26:10 PDT
Created attachment 568044 [details] [diff] [review]
Make JS module/component dump go to stdout and flush

This fixes the issue.
Comment 2 Blake Kaplan (:mrbkap) (please use needinfo!) 2011-10-25 09:34:52 PDT
Comment on attachment 568044 [details] [diff] [review]
Make JS module/component dump go to stdout and flush

Review of attachment 568044 [details] [diff] [review]:
-----------------------------------------------------------------

Should Debug() go to stderr? Also, please use -p in your diffs for review!
Comment 3 Ted Mielczarek [:ted.mielczarek] 2011-10-25 12:30:41 PDT
Sorry about the diff, apparently I don't have -p in my options on my mac! Making Debug go to stderr doesn't sound unreasonable, but that's a lot more fiddly work than this patch, since right now Debug just calls Dump. I'm just going to push what I have for now, since this fixes a real problem that ahal hit with his harness.

http://hg.mozilla.org/integration/mozilla-inbound/rev/cb7af497e97a
Comment 4 Ed Morley [:emorley] 2011-10-25 18:00:55 PDT
https://hg.mozilla.org/mozilla-central/rev/cb7af497e97a

Note You need to log in before you can comment on or make changes to this bug.