From 92bbf759719d92d5ab39baea5151f275296adc10 Mon Sep 17 00:00:00 2001 From: "erik.corry@gmail.com" Date: Tue, 16 Jun 2009 13:44:48 +0000 Subject: [PATCH] Don't panic if tickprocessor can't find a shared library. Don't swallow exceptions so we can't see where they are really thrown. Review URL: http://codereview.chromium.org/126200 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2192 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- tools/tickprocessor.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/tickprocessor.js b/tools/tickprocessor.js index cce579b..dfe60ae 100644 --- a/tools/tickprocessor.js +++ b/tools/tickprocessor.js @@ -157,18 +157,13 @@ TickProcessor.prototype.processLogFile = function(fileName) { 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; + var fields = csvParser.parseLine(line); + this.dispatchLogRow(fields); } }; @@ -487,11 +482,16 @@ UnixCppEntriesProvider.FUNC_RE = /^([0-9a-fA-F]{8}) . (.*)$/; 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) + ]; + } catch (e) { + // If the library cannot be found on this system let's not panic. + this.symbols = [ '', '' ]; + } }; -- 2.7.4