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

Unified Diff: tracing/tracing/extras/importer/etw/thread_parser.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
Index: tracing/tracing/extras/importer/etw/thread_parser.html
diff --git a/tracing/tracing/extras/importer/etw/thread_parser.html b/tracing/tracing/extras/importer/etw/thread_parser.html
index 83950801cda7b2b3742d50857372bc510e08bb03..8c4b51bc557f990aa9e6d0f25e606bfacec7fee8 100644
--- a/tracing/tracing/extras/importer/etw/thread_parser.html
+++ b/tracing/tracing/extras/importer/etw/thread_parser.html
@@ -59,8 +59,9 @@ tr.exportTo('tr.e.importer.etw', function() {
__proto__: Parser.prototype,
decodeFields: function(header, decoder) {
- if (header.version > 3)
+ if (header.version > 3) {
throw new Error('Incompatible Thread event version.');
+ }
// Common fields to all Thread events.
var processId = decoder.decodeUInt32();
@@ -102,10 +103,11 @@ tr.exportTo('tr.e.importer.etw', function() {
userStackLimit = decoder.decodeUInteger(header.is64);
// Version 2 produces a field named 'startAddr'.
- if (header.version === 2)
+ if (header.version === 2) {
startAddr = decoder.decodeUInteger(header.is64);
- else
+ } else {
affinity = decoder.decodeUInteger(header.is64);
+ }
win32StartAddr = decoder.decodeUInteger(header.is64);
tebBase = decoder.decodeUInteger(header.is64);
@@ -140,8 +142,9 @@ tr.exportTo('tr.e.importer.etw', function() {
},
decodeCSwitchFields: function(header, decoder) {
- if (header.version !== 2)
+ if (header.version !== 2) {
throw new Error('Incompatible Thread event version.');
+ }
// Decode CSwitch payload.
var newThreadId = decoder.decodeUInt32();
@@ -213,10 +216,11 @@ tr.exportTo('tr.e.importer.etw', function() {
fields.newThreadId);
var newProcess = this.model.getProcess(newProcessId);
var newProcessName;
- if (newProcess)
+ if (newProcess) {
newProcessName = newProcess.name;
- else
+ } else {
newProcessName = 'Unknown process';
+ }
newThreadName =
newProcessName + ' (tid ' + fields.newThreadId + ')';

Powered by Google App Engine
This is Rietveld 408576698