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

Unified Diff: tools/tickprocessor.js

Issue 126200: Don't panic if tickprocessor can't find a shared library.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 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: tools/tickprocessor.js
===================================================================
--- tools/tickprocessor.js (revision 2185)
+++ tools/tickprocessor.js (working copy)
@@ -157,18 +157,13 @@
TickProcessor.prototype.processLog = function(lines) {
var csvParser = new devtools.profiler.CsvParser();
- try {
- for (var i = 0, n = lines.length; i < n; ++i) {
- var line = lines[i];
- if (!line) {
- continue;
- }
- var fields = csvParser.parseLine(line);
- this.dispatchLogRow(fields);
+ for (var i = 0, n = lines.length; i < n; ++i) {
+ var line = lines[i];
+ if (!line) {
+ continue;
}
- } catch (e) {
- print('line ' + (i + 1) + ': ' + (e.message || e));
- throw e;
mnaganov (inactive) 2009/06/16 13:32:00 Hmm... Does rethrowing an exception fails in your
Erik Corry 2009/06/16 13:44:56 No, it just means I can't see the original backtra
+ var fields = csvParser.parseLine(line);
+ this.dispatchLogRow(fields);
}
};
@@ -487,11 +482,17 @@
UnixCppEntriesProvider.prototype.loadSymbols = function(libName) {
- this.symbols = [
- os.system('nm', ['-C', '-n', libName], -1, -1),
- os.system('nm', ['-C', '-n', '-D', libName], -1, -1)
- ];
- this.parsePos = 0;
+ try {
+ this.symbols = [
+ os.system('nm', ['-C', '-n', libName], -1, -1),
+ os.system('nm', ['-C', '-n', '-D', libName], -1, -1)
+ ];
+ this.parsePos = 0;
mnaganov (inactive) 2009/06/16 13:32:00 You can move this assignment before the try block.
+ } catch (e) {
+ // If the library cannot be found on this system let's not panic.
+ this.symbols = [ "", "" ];
mnaganov (inactive) 2009/06/16 13:32:00 nit: Use single quotes.
+ this.parsePos = 0;
+ }
};
« 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