Reviewers: Michail Naganov, Description: 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.
Please review this at http://codereview.chromium.org/126200 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M tools/tickprocessor.js 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; + 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; + } catch (e) { + // If the library cannot be found on this system let's not panic. + this.symbols = [ "", "" ]; + this.parsePos = 0; + } }; --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
