Title: [187086] branches/safari-601.1-branch/Source/WebCore

Diff

Modified: branches/safari-601.1-branch/Source/WebCore/ChangeLog (187085 => 187086)


--- branches/safari-601.1-branch/Source/WebCore/ChangeLog	2015-07-21 04:38:19 UTC (rev 187085)
+++ branches/safari-601.1-branch/Source/WebCore/ChangeLog	2015-07-21 05:08:13 UTC (rev 187086)
@@ -1,5 +1,26 @@
 2015-07-20  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r186715. rdar://problem/21863296
+
+    2015-07-11  Benjamin Poulain  <benja...@webkit.org>
+
+            Fix CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
+            https://bugs.webkit.org/show_bug.cgi?id=146879
+
+            Reviewed by Andreas Kling.
+
+            Some of my recent changes broke CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING :(
+
+            * contentextensions/CombinedURLFilters.cpp:
+            (WebCore::ContentExtensions::prefixTreeVertexToString):
+            (WebCore::ContentExtensions::recursivePrint):
+            (WebCore::ContentExtensions::CombinedURLFilters::print):
+            * contentextensions/ContentExtensionsDebugging.h:
+            * contentextensions/DFA.cpp:
+            (WebCore::ContentExtensions::DFA::debugPrintDot):
+
+2015-07-20  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r186955. rdar://problem/14489674
 
     2015-07-17  Mark Lam  <mark....@apple.com>

Modified: branches/safari-601.1-branch/Source/WebCore/contentextensions/CombinedURLFilters.cpp (187085 => 187086)


--- branches/safari-601.1-branch/Source/WebCore/contentextensions/CombinedURLFilters.cpp	2015-07-21 04:38:19 UTC (rev 187085)
+++ branches/safari-601.1-branch/Source/WebCore/contentextensions/CombinedURLFilters.cpp	2015-07-21 05:08:13 UTC (rev 187086)
@@ -78,16 +78,16 @@
 #endif
     
 #if CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
-static String prefixTreeVertexToString(const PrefixTreeVertex& vertex, unsigned depth)
+static String prefixTreeVertexToString(const PrefixTreeVertex& vertex, const HashMap<const PrefixTreeVertex*, ActionList>& actions, unsigned depth)
 {
     StringBuilder builder;
     while (depth--)
         builder.append("  ");
     builder.append("vertex actions: ");
 
-    auto actionsSlot = m_actions.find(&vertex);
-    if (actionsSlot != m_actions.end()) {
-        for (auto action : *actionsSlot->value) {
+    auto actionsSlot = actions.find(&vertex);
+    if (actionsSlot != actions.end()) {
+        for (uint64_t action : actionsSlot->value) {
             builder.appendNumber(action);
             builder.append(',');
         }
@@ -96,9 +96,9 @@
     return builder.toString();
 }
 
-static void recursivePrint(const PrefixTreeVertex& vertex, unsigned depth)
+static void recursivePrint(const PrefixTreeVertex& vertex, const HashMap<const PrefixTreeVertex*, ActionList>& actions, unsigned depth)
 {
-    dataLogF("%s", prefixTreeVertexToString(vertex, depth).utf8().data());
+    dataLogF("%s", prefixTreeVertexToString(vertex, actions, depth).utf8().data());
     for (const auto& edge : vertex.edges) {
         StringBuilder builder;
         for (unsigned i = 0; i < depth * 2; ++i)
@@ -108,13 +108,13 @@
         builder.append('\n');
         dataLogF("%s", builder.toString().utf8().data());
         ASSERT(edge.child);
-        recursivePrint(*edge.child.get(), depth + 1);
+        recursivePrint(*edge.child.get(), actions, depth + 1);
     }
 }
 
 void CombinedURLFilters::print() const
 {
-    recursivePrint(*m_prefixTreeRoot.get(), 0);
+    recursivePrint(*m_prefixTreeRoot.get(), m_actions, 0);
 }
 #endif
 

Modified: branches/safari-601.1-branch/Source/WebCore/contentextensions/ContentExtensionsDebugging.h (187085 => 187086)


--- branches/safari-601.1-branch/Source/WebCore/contentextensions/ContentExtensionsDebugging.h	2015-07-21 04:38:19 UTC (rev 187085)
+++ branches/safari-601.1-branch/Source/WebCore/contentextensions/ContentExtensionsDebugging.h	2015-07-21 05:08:13 UTC (rev 187086)
@@ -38,7 +38,7 @@
 #define CONTENT_EXTENSIONS_PAGE_SIZE 16384
 
 #if CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
-typedef CrashOnOverflow ContentExtensionsOverflowHandler;
+typedef WTF::CrashOnOverflow ContentExtensionsOverflowHandler;
 #else
 typedef UnsafeVectorOverflow ContentExtensionsOverflowHandler;
 #endif

Modified: branches/safari-601.1-branch/Source/WebCore/contentextensions/DFA.cpp (187085 => 187086)


--- branches/safari-601.1-branch/Source/WebCore/contentextensions/DFA.cpp	2015-07-21 04:38:19 UTC (rev 187085)
+++ branches/safari-601.1-branch/Source/WebCore/contentextensions/DFA.cpp	2015-07-21 05:08:13 UTC (rev 187086)
@@ -147,6 +147,7 @@
                 dataLogF("%llu", actions[actionIndex]);
             }
         }
+        dataLogF("]");
 
         if (!actions.isEmpty())
             dataLogF(" [shape=doublecircle]");
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to