[Webkit-unassigned] [Bug 40447] Infinite loop in WebInspector.TextEditorModel.prototype._replaceTabsIfNeeded

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 29 06:29:19 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=40447


Pavel Feldman <pfeldman at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #98905|review?                     |
               Flag|                            |




--- Comment #6 from Pavel Feldman <pfeldman at chromium.org>  2011-06-29 06:29:19 PST ---
(From update of attachment 98905)
View in context: https://bugs.webkit.org/attachment.cgi?id=98905&action=review

Looks good. Please fix the log entry at least.

> Source/WebCore/ChangeLog:5
> +        Infinite loop in WebInspector.TextEditorModel.prototype._replaceTabsIfNeeded

You should change the log entry in case it was not in fact an infinite loop. Also, please start bug title with the "Web Inspector:".

> Source/WebCore/inspector/front-end/TextEditorModel.js:152
> +            var sum = 0;

I'd rename "sum" to the "offset".

> Source/WebCore/inspector/front-end/TextEditorModel.js:164
> +            if (line.length > caretIndex) {

no need for { }

> LayoutTests/inspector/editor/text-editor-model-replace-tabs.html:15
> +        InspectorTest.addResult("Output length:" + lines[0].length + ", output matches sample:" + (lines[0] === sampleOutput));

We would typically dump "text" and "sampleOutput" instead. It is way more informative.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list