From: benjamin@webkit.org Date: Fri, 5 Jun 2015 03:37:35 +0000 (+0000) Subject: The last 2 merged DFAs are not minimized by DFACombiner X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=e490b4dfdb863aa12fe4e4ce9f90106705af640b The last 2 merged DFAs are not minimized by DFACombiner Patch by Benjamin Poulain on 2015-06-04 * contentextensions/DFACombiner.cpp: (WebCore::ContentExtensions::DFACombiner::combineDFAs): I introduced a bug when I made minimization conditional: the last merge does not minimize if we do not reach the minimum size. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185235 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 8995fcc..6bfa76f 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,12 @@ +2015-06-04 Benjamin Poulain + + The last 2 merged DFAs are not minimized by DFACombiner + + * contentextensions/DFACombiner.cpp: + (WebCore::ContentExtensions::DFACombiner::combineDFAs): + I introduced a bug when I made minimization conditional: the last merge + does not minimize if we do not reach the minimum size. + 2015-06-04 Brent Fulgham Latching algorithm in findEnclosingOverflowScroll is broken diff --git a/Source/WebCore/contentextensions/DFACombiner.cpp b/Source/WebCore/contentextensions/DFACombiner.cpp index 93f6468..3753c6f 100644 --- a/Source/WebCore/contentextensions/DFACombiner.cpp +++ b/Source/WebCore/contentextensions/DFACombiner.cpp @@ -248,7 +248,7 @@ void DFACombiner::combineDFAs(unsigned minimumSize, std::function h DFAMerger dfaMerger(a, b); DFA c = dfaMerger.merge(); - if (c.graphSize() > minimumSize) { + if (c.graphSize() > minimumSize || m_dfas.isEmpty()) { // Minimizing is somewhat expensive. We only do it in bulk when we reach the threshold // to reduce the load. c.minimize();