URLFilterParser dismisses the last atom when parsing a builtin character class
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jan 2015 23:11:17 +0000 (23:11 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jan 2015 23:11:17 +0000 (23:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140695

Reviewed by Andreas Kling.

The pending atom was not sunk before creating the new atom.

* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178759 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/contentextensions/URLFilterParser.cpp

index 507129a..af74c94 100644 (file)
@@ -1,3 +1,15 @@
+2015-01-20  Benjamin Poulain  <benjamin@webkit.org>
+
+        URLFilterParser dismisses the last atom when parsing a builtin character class
+        https://bugs.webkit.org/show_bug.cgi?id=140695
+
+        Reviewed by Andreas Kling.
+
+        The pending atom was not sunk before creating the new atom.
+
+        * contentextensions/URLFilterParser.cpp:
+        (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
+
 2015-01-20  Andreas Kling  <akling@apple.com>
 
         Fast path for casting JSValue to JSDocument*.
index ea557cb..eb2df91 100644 (file)
@@ -126,6 +126,8 @@ public:
         if (hasError())
             return;
 
+        sinkPendingAtomIfNecessary();
+
         if (builtInCharacterClassID == JSC::Yarr::NewlineClassID && inverted) {
             m_hasValidAtom = true;
             ASSERT(m_lastPrefixTreeEntry);