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

Unified Diff: tools/logreader.js

Issue 171038: Fix issue 420: accept truncated log files. (Closed)
Patch Set: Comment addressed Created 11 years, 4 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 | « test/mjsunit/tools/logreader.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/logreader.js
diff --git a/tools/logreader.js b/tools/logreader.js
index 78085a451eb62e75de72d9c1c7b1724822b9efbd..88ab907740d5dc3807431bc53aa50865208bb1db 100644
--- a/tools/logreader.js
+++ b/tools/logreader.js
@@ -294,8 +294,11 @@ devtools.profiler.LogReader.prototype.processLog_ = function(lines) {
this.dispatchLogRow_(fields);
}
} catch (e) {
- this.printError('line ' + (i + 1) + ': ' + (e.message || e));
- throw e;
+ // An error on the last line is acceptable since log file can be truncated.
+ if (i < n - 1) {
+ this.printError('line ' + (i + 1) + ': ' + (e.message || e));
+ throw e;
+ }
}
};
« no previous file with comments | « test/mjsunit/tools/logreader.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698