Skip to content

Commit 82f4135

Browse files
committed
flush the chrome trace file before adding the eof metadata
1 parent e9c4151 commit 82f4135

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

intercept/src/chrometracer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ class CChromeTracer
2727

2828
~CChromeTracer()
2929
{
30+
flush();
31+
3032
// Add an eof metadata event without a trailing comma to properly end
3133
// the json file.
3234
m_TraceFile
3335
<< "{\"ph\":\"M\",\"name\":\"clintercept_eof\",\"pid\":" << m_ProcessId
3436
<< ",\"tid\":0"
3537
<< "}\n"
3638
<< "]\n";
37-
flush();
3839
m_TraceFile.close();
3940
}
4041

0 commit comments

Comments
 (0)