Title: [129641] trunk/Source/WebCore
- Revision
- 129641
- Author
- [email protected]
- Date
- 2012-09-26 07:23:43 -0700 (Wed, 26 Sep 2012)
Log Message
Web Inspector: DefaultTextEditor throws exception sometimes.
https://bugs.webkit.org/show_bug.cgi?id=97681
Reviewed by Alexander Pavlov.
Added a check that line number does not exceed text model line count.
* inspector/front-end/DefaultTextEditor.js:
(WebInspector.TextEditorMainPanel.prototype._positionToSelection):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (129640 => 129641)
--- trunk/Source/WebCore/ChangeLog 2012-09-26 14:23:01 UTC (rev 129640)
+++ trunk/Source/WebCore/ChangeLog 2012-09-26 14:23:43 UTC (rev 129641)
@@ -1,3 +1,15 @@
+2012-09-26 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: DefaultTextEditor throws exception sometimes.
+ https://bugs.webkit.org/show_bug.cgi?id=97681
+
+ Reviewed by Alexander Pavlov.
+
+ Added a check that line number does not exceed text model line count.
+
+ * inspector/front-end/DefaultTextEditor.js:
+ (WebInspector.TextEditorMainPanel.prototype._positionToSelection):
+
2012-09-26 Kenneth Rohde Christiansen <[email protected]>
[TextureMapper] Remove unused method
Modified: trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js (129640 => 129641)
--- trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js 2012-09-26 14:23:01 UTC (rev 129640)
+++ trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js 2012-09-26 14:23:43 UTC (rev 129641)
@@ -2029,7 +2029,7 @@
var rangeBoundary = lineRow.rangeBoundaryForOffset(column);
else {
var offset = column;
- for (var i = chunk.startLine; i < line; ++i)
+ for (var i = chunk.startLine; i < line && i < this._textModel.linesCount; ++i)
offset += this._textModel.lineLength(i) + 1; // \n
lineRow = chunk.element;
if (lineRow.firstChild)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes