[webkit-reviews] review granted: [Bug 201769] Web Inspector: HTML Formatting: Handle infinite loop for incomplete script data : [Attachment 378762] [PATCH] Proposed Fix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 13 18:06:47 PDT 2019


Devin Rousso <drousso at apple.com> has granted Joseph Pecoraro
<joepeck at webkit.org>'s request for review:
Bug 201769: Web Inspector: HTML Formatting: Handle infinite loop for incomplete
script data
https://bugs.webkit.org/show_bug.cgi?id=201769

Attachment 378762: [PATCH] Proposed Fix

https://bugs.webkit.org/attachment.cgi?id=378762&action=review




--- Comment #4 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 378762
  --> https://bugs.webkit.org/attachment.cgi?id=378762
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=378762&action=review

r=me, looks reasonable :)

> Source/WebInspectorUI/UserInterface/Workers/Formatter/HTMLParser.js:181
> +	   if (this._isEOF() && this._data.endsWith("<"))

Could you move this check into the `if (text)` above, since we would’ve
consumed up to a “<“ there anyways?  I think then we could still use
`_handleEOF`.

> Source/WebInspectorUI/UserInterface/Workers/Formatter/HTMLParser.js:199
> +		   this._handleEOF(startPos);

Could we have `_handleEOF` return whether `_isEOF` so we don’t have to check it
twice?


More information about the webkit-reviews mailing list