[Content Extensions] Limit NFA size.
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 May 2015 01:12:49 +0000 (01:12 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 May 2015 01:12:49 +0000 (01:12 +0000)
commitf9291bfecf3df88fe1fe2226a01aaa2220b9f839
tree1f8656d9be550ec4453a85b5729d25dff712b0fa
parentc97a6124a65be3c00ac05b56074f747655b0c0be
[Content Extensions] Limit NFA size.
https://bugs.webkit.org/show_bug.cgi?id=144649

Reviewed by Benjamin Poulain.

* contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::generateNFAForSubtree):
(WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
Add a maximum NFA size to ensure that we do not use too much memory when compiling.
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
Remove debugging code that doesn't compile any more.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/contentextensions/CombinedURLFilters.cpp
Source/WebCore/contentextensions/ContentExtensionCompiler.cpp