Closed Bug 683400 Opened 8 years ago Closed 8 years ago

SandboxDump should flush stderr after writing output

Categories

(Core :: XPConnect, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: markh, Assigned: markh)

Details

Attachments

(1 file)

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 on attachment 557051 [details] [diff] [review]
flush stderr after writing dump() output to it.

Requesting review from Blake as the module owner.
Attachment #557051 - Flags: review?(mrbkap)
Attachment #557051 - Flags: review?(mrbkap) → review+
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?
Assignee: nobody → mhammond
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.
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/891362a930b0
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.