SandboxDump should flush stderr after writing output

RESOLVED FIXED in mozilla9

Status

()

Core
XPConnect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: markh, Assigned: markh)

Tracking

Trunk
mozilla9
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
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.
(Assignee)

Comment 1

6 years ago
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)

Updated

6 years ago
Attachment #557051 - Flags: review?(mrbkap) → review+
(Assignee)

Comment 2

6 years ago
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
(Assignee)

Comment 3

6 years ago
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
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/891362a930b0
Keywords: checkin-needed
Target Milestone: --- → mozilla9

Comment 5

6 years ago
https://hg.mozilla.org/mozilla-central/rev/891362a930b0
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Comment 6

6 years ago
Not sure if this or bug 687696 is responsible for the recent Ts regression:

https://groups.google.com/forum/#!topic/mozilla.dev.tree-management/WOlX-ghe0H4

http://graphs-new.mozilla.org/graph.html#tests=[[54,63,14],[54,63,15]]&sel=1316423909867.185,1316699577328&displayrange=7&datatype=running
You need to log in before you can comment on or make changes to this bug.