Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Unified Diff: tools/profile_chrome/trace_packager.py

Issue 1068693003: Fixing crash on chrome profiler on generating html trace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/profile_chrome/trace_packager.py
diff --git a/tools/profile_chrome/trace_packager.py b/tools/profile_chrome/trace_packager.py
index d880f7b096a00cdf04dbdd41b483296d2e9ff492..4ec3f9ad2ead471029b9807e773119e843cf3dc5 100644
--- a/tools/profile_chrome/trace_packager.py
+++ b/tools/profile_chrome/trace_packager.py
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import codecs
import gzip
import json
import os
@@ -21,7 +22,7 @@ from trace_viewer.build import trace2html
def _PackageTracesAsHtml(trace_files, html_file):
- with open(html_file, 'w') as f:
+ with codecs.open(html_file, mode='w', encoding='utf-8') as f:
trace2html.WriteHTMLForTracesToFile(trace_files, f)
for trace_file in trace_files:
os.unlink(trace_file)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698