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

Unified Diff: tracing/tracing/base/in_memory_trace_stream.html

Issue 3006253002: Avoid String.fromCharCode in building TraceStreams (Closed)
Patch Set: Created 3 years, 3 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: tracing/tracing/base/in_memory_trace_stream.html
diff --git a/tracing/tracing/base/in_memory_trace_stream.html b/tracing/tracing/base/in_memory_trace_stream.html
index d9377620030aa3373d71b9e256cc2d66dc994af2..69b02015c44076478f55ac78944ab524138d53f4 100644
--- a/tracing/tracing/base/in_memory_trace_stream.html
+++ b/tracing/tracing/base/in_memory_trace_stream.html
@@ -93,6 +93,10 @@ tr.exportTo('tr.b', function() {
}
static uint8ArrayToString_(arr) {
+ if (typeof TextDecoder !== 'undefined') {
+ const decoder = new TextDecoder('utf-8');
+ return decoder.decode(arr);
+ }
const c = [];
for (let i = 0; i < arr.length; i += MAX_FUNCTION_ARGS_COUNT) {
c.push(String.fromCharCode(...arr.subarray(
« 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