[Webkit-unassigned] [Bug 180539] ApplicationManifestParser should strip whitespace from the raw input

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 7 16:41:49 PST 2017


Joseph Pecoraro <joepeck at webkit.org> changed:

           What    |Removed                     |Added
                 CC|                            |joepeck at webkit.org
 Attachment #328735|review?                     |review+
              Flags|                            |

--- Comment #3 from Joseph Pecoraro <joepeck at webkit.org> ---
Comment on attachment 328735
  --> https://bugs.webkit.org/attachment.cgi?id=328735

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


> Source/WebCore/Modules/applicationmanifest/ApplicationManifestParser.cpp:60
>      RefPtr<JSON::Value> jsonValue;
> -    if (!JSON::Value::parseJSON(text, jsonValue)) {
> +    if (!JSON::Value::parseJSON(text.stripWhiteSpace(), jsonValue)) {

Does this actually change behavior? parseJSON looks to ignore leading whitespace:

> Token parseToken(const UChar* start, const UChar* end, const UChar** tokenStart, const UChar** tokenEnd)
> {
>     while (start < end && isSpaceOrNewline(*start))
>         ++start;
>     ...

It might also be good to have a link to the spec at the top of this file somewhere for quick reference. I suspect that is:

This part appears to be:

1. Let json be the result of parsing text. If parsing throws an error: ...

And here parseJSON(text) should satisfy this without the stripWhiteSpace.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171208/96f6abc0/attachment-0001.html>

More information about the webkit-unassigned mailing list