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

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

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase Created 3 years, 9 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 | « tracing/tracing/base/headless_tests.html ('k') | tracing/tracing/base/interval_tree.html » ('j') | 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 894dbc4429bff72f58618b420b56c5902716aa9b..9c79c7a3bd3c79ff422861043ff56f3cebcd474d 100644
--- a/tracing/tracing/base/in_memory_trace_stream.html
+++ b/tracing/tracing/base/in_memory_trace_stream.html
@@ -16,8 +16,9 @@ tr.exportTo('tr.b', function() {
class InMemoryTraceStream extends tr.b.TraceStream {
constructor(buffer, isBinary, opt_headerSize) {
super();
- if (!buffer instanceof Uint8Array)
+ if (!buffer instanceof Uint8Array) {
throw new Error('buffer should be a Uint8Array');
+ }
let headerSize = opt_headerSize || tr.b.TraceStream.HEADER_SIZE;
this.data_ = buffer;
@@ -40,8 +41,9 @@ tr.exportTo('tr.b', function() {
}
readUntilDelimiter(delim) {
- if (delim.length !== 1)
+ if (delim.length !== 1) {
throw new Error('delim must be exactly one character');
+ }
let offset = this.data_.indexOf(delim.charCodeAt(0), this.cursor_) + 1;
return this.readToOffset_(
offset > 0 ? Math.min(offset, this.data_.length) : this.data_.length);
« no previous file with comments | « tracing/tracing/base/headless_tests.html ('k') | tracing/tracing/base/interval_tree.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698