Bug 143281 - Content extensions should properly handle regexes that match everything
Summary: Content extensions should properly handle regexes that match everything
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-31 16:27 PDT by Alex Christensen
Modified: 2015-04-02 12:44 PDT (History)
1 user (show)

See Also:


Attachments
Patch (35.85 KB, patch)
2015-03-31 17:13 PDT, Alex Christensen
benjamin: 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 2015-03-31 16:27:24 PDT
Right now, when you only have regexes that match everything, infinite loops happen.  Let's make it safer, faster, and more correct!
Comment 1 Alex Christensen 2015-03-31 17:13:41 PDT
Created attachment 249870 [details]
Patch
Comment 2 Benjamin Poulain 2015-03-31 17:59:51 PDT
Comment on attachment 249870 [details]
Patch

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

> Source/WebCore/contentextensions/CombinedURLFilters.cpp:205
> +    if (!nfas.size())
> +        nfas.append(NFA());

I think I would do this in the ExtensionCompiler only if there are universal actions.
Comment 3 Alex Christensen 2015-04-02 12:44:50 PDT
http://trac.webkit.org/changeset/182239