Bug 169106 - Modernize ContentExtensionParser
Summary: Modernize ContentExtensionParser
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-02 15:51 PST by Alex Christensen
Modified: 2017-03-02 16:17 PST (History)
0 users

See Also:


Attachments
Patch (19.92 KB, patch)
2017-03-02 15:54 PST, Alex Christensen
aestes: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2017-03-02 15:51:33 PST
Modernize ContentExtensionParser
Comment 1 Alex Christensen 2017-03-02 15:54:49 PST
Created attachment 303262 [details]
Patch
Comment 2 Andy Estes 2017-03-02 16:00:44 PST
Comment on attachment 303262 [details]
Patch

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

> Source/WebCore/contentextensions/ContentExtensionParser.cpp:67
> -    ASSERT(vector.isEmpty());
> +    Vector<String> domains;

I'd declare this farther down, before the for loop.

> Source/WebCore/contentextensions/ContentExtensionParser.cpp:86
> +    return domains;

The NRVO won't apply here, so you should WTFMove() domains.

> Source/WebCore/contentextensions/ContentExtensionParser.cpp:188
> +    return trigger;

Ditto.

> Source/WebCore/contentextensions/ContentExtensionParser.cpp:299
> +    return ruleList;

Ditto.

> Source/WebCore/contentextensions/ContentExtensionParser.cpp:328
> +    return ruleList;

Ditto.
Comment 3 Alex Christensen 2017-03-02 16:17:52 PST
http://trac.webkit.org/r213322