Index: Source/WebCore/inspector/front-end/TextViewer.js |
=================================================================== |
--- Source/WebCore/inspector/front-end/TextViewer.js (revision 86685) |
+++ Source/WebCore/inspector/front-end/TextViewer.js (working copy) |
@@ -108,6 +108,9 @@ |
highlightLine: function(lineNumber) |
{ |
+ if (typeof lineNumber !== "number" || lineNumber < 0) |
+ return; |
+ |
this._mainPanel.highlightLine(lineNumber); |
}, |
@@ -406,6 +409,12 @@ |
{ |
var chunkNumber = this._chunkNumberForLine(lineNumber); |
var oldChunk = this._textChunks[chunkNumber]; |
+ |
+ if (!oldChunk) { |
+ console.error("No chunk for line number: " + lineNumber); |
+ return; |
+ } |
+ |
if (oldChunk.linesCount === 1) |
return oldChunk; |