Bug 143281

Summary: Content extensions should properly handle regexes that match everything
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: WebCore Misc.Assignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch benjamin: review+

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