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

Unified Diff: tracing/tracing/extras/importer/etw/process_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/process_parser.html
diff --git a/tracing/tracing/extras/importer/etw/process_parser.html b/tracing/tracing/extras/importer/etw/process_parser.html
index dac4666a1b8f2c30118562409cdb3203bd52112f..d758d61c7422971ad8a473fc15381512901b1f13 100644
--- a/tracing/tracing/extras/importer/etw/process_parser.html
+++ b/tracing/tracing/extras/importer/etw/process_parser.html
@@ -59,16 +59,19 @@ tr.exportTo('tr.e.importer.etw', function() {
__proto__: Parser.prototype,
decodeFields: function(header, decoder) {
- if (header.version > 5)
+ if (header.version > 5) {
throw new Error('Incompatible Process event version.');
+ }
var pageDirectoryBase;
- if (header.version === 1)
+ if (header.version === 1) {
pageDirectoryBase = decoder.decodeUInteger(header.is64);
+ }
var uniqueProcessKey;
- if (header.version >= 2)
+ if (header.version >= 2) {
uniqueProcessKey = decoder.decodeUInteger(header.is64);
+ }
var processId = decoder.decodeUInt32();
var parentId = decoder.decodeUInt32();
@@ -81,22 +84,26 @@ tr.exportTo('tr.e.importer.etw', function() {
}
var directoryTableBase;
- if (header.version >= 3)
+ if (header.version >= 3) {
directoryTableBase = decoder.decodeUInteger(header.is64);
+ }
var flags;
- if (header.version >= 4)
+ if (header.version >= 4) {
flags = decoder.decodeUInt32();
+ }
var userSID = decoder.decodeSID(header.is64);
var imageFileName;
- if (header.version >= 1)
+ if (header.version >= 1) {
imageFileName = decoder.decodeString();
+ }
var commandLine;
- if (header.version >= 2)
+ if (header.version >= 2) {
commandLine = decoder.decodeW16String();
+ }
var packageFullName;
var applicationId;
@@ -106,8 +113,9 @@ tr.exportTo('tr.e.importer.etw', function() {
}
var exitTime;
- if (header.version === 5 && header.opcode === kProcessDefunctOpcode)
+ if (header.version === 5 && header.opcode === kProcessDefunctOpcode) {
exitTime = decoder.decodeUInt64ToString();
+ }
return {
pageDirectoryBase: pageDirectoryBase,
@@ -150,8 +158,9 @@ tr.exportTo('tr.e.importer.etw', function() {
decodeDCStart: function(header, decoder) {
var fields = this.decodeFields(header, decoder);
var process = this.model.getOrCreateProcess(fields.processId);
- if (process.hasOwnProperty('has_ended'))
+ if (process.hasOwnProperty('has_ended')) {
throw new Error('Process clash detected.');
+ }
process.name = fields.imageFileName;
return true;
},
« no previous file with comments | « tracing/tracing/extras/importer/etw/eventtrace_parser.html ('k') | tracing/tracing/extras/importer/etw/thread_parser.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698