Last Comment Bug 683400 - SandboxDump should flush stderr after writing output
: SandboxDump should flush stderr after writing output
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla9
Assigned To: Mark Hammond [:markh]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-30 17:54 PDT by Mark Hammond [:markh]
Modified: 2011-09-22 07:10 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
flush stderr after writing dump() output to it. (341 bytes, patch)
2011-08-30 17:54 PDT, Mark Hammond [:markh]
mrbkap: review+
Details | Diff | Splinter Review

Description Mark Hammond [:markh] 2011-08-30 17:54:56 PDT
Created attachment 557051 [details] [diff] [review]
flush stderr after writing dump() output to it.

When a script in an XPConnect sandbox calls dump(), the string is written to stderr but that stream is not flushed.  This is a problem when the program output is redirected and stderr is buffered - the string may not appear in the output until after the buffer is full or the program terminates.  We are seeing this problem in Jetpack via bug 665250.

Note that bug 489938 added the flush to nsGlobalWindow.cpp, so dump() called from content is already flushed.

Attaching a single line patch to flush stderr after writing the output.
Comment 1 Mark Hammond [:markh] 2011-09-19 20:19:09 PDT
Comment on attachment 557051 [details] [diff] [review]
flush stderr after writing dump() output to it.

Requesting review from Blake as the module owner.
Comment 2 Mark Hammond [:markh] 2011-09-19 20:37:51 PDT
Thanks Blake - can you recommend someone to offer sr?  And please excuse my ignorance of the current process, but after an sr, is the next step for me to just push it to mozilla-central?
Comment 3 Mark Hammond [:markh] 2011-09-19 21:31:38 PDT
Been told in #developers that an sr isn't required on this bug, so once my hg account gets reactivated I'll push it to mozilla-incoming.
Comment 5 Ed Morley [:emorley] 2011-09-21 18:04:35 PDT
https://hg.mozilla.org/mozilla-central/rev/891362a930b0

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