Bug 1170596 - JitSpewer: Always flush after dumping the graph to the files. r=bbouvier
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Tue, 02 Jun 2015 19:40:04 +0200
changeset 269388 f58aadb6c75e5dcb4256639073451326f5e40f8d
parent 269387 cd49e72bd97bf8ac840eedc025224556d1c7b5f6
child 269389 ce014d3475af5f769ec12c56de18f8d286f218b2
push id2501
push userjosea.olivera@gmail.com
push dateWed, 03 Jun 2015 06:55:32 +0000
reviewersbbouvier
bugs1170596
milestone41.0a1
Bug 1170596 - JitSpewer: Always flush after dumping the graph to the files. r=bbouvier
js/src/jit/JitSpewer.cpp
--- a/js/src/jit/JitSpewer.cpp
+++ b/js/src/jit/JitSpewer.cpp
@@ -312,24 +312,27 @@ GraphSpewer::endFunction()
 
     ionspewer.endFunction(this);
     graph_ = nullptr;
 }
 
 void
 GraphSpewer::dump(Fprinter& c1Out, Fprinter& jsonOut)
 {
-    if (!c1Printer_.hadOutOfMemory())
+    if (!c1Printer_.hadOutOfMemory()) {
         c1Printer_.exportInto(c1Out);
+        c1Out.flush();
+    }
     c1Printer_.clear();
 
     if (!jsonPrinter_.hadOutOfMemory())
         jsonPrinter_.exportInto(jsonOut);
     else
         jsonOut.put("{}");
+    jsonOut.flush();
     jsonPrinter_.clear();
 }
 
 void
 jit::SpewBeginFunction(MIRGenerator* mir, JSScript* function)
 {
     MIRGraph* graph = &mir->graph();
     mir->graphSpewer().init(graph, function);