[webkit-reviews] review canceled: [Bug 40447] Infinite loop in WebInspector.TextEditorModel.prototype._replaceTabsIfNeeded : [Attachment 98905] Fix performance / memory allocation problem

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


Pavel Feldman <pfeldman at chromium.org> has canceled eustas.bug at gmail.com's
request for review:
Bug 40447: Infinite loop in
WebInspector.TextEditorModel.prototype._replaceTabsIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=40447

Attachment 98905: Fix performance / memory allocation problem
https://bugs.webkit.org/attachment.cgi?id=98905&action=review

------- Additional Comments from Pavel Feldman <pfeldman at chromium.org>
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.


More information about the webkit-reviews mailing list