Title: [194956] trunk/Source/WebCore
Revision
194956
Author
[email protected]
Date
2016-01-12 22:58:34 -0800 (Tue, 12 Jan 2016)

Log Message

[Content Filtering] forEachContentFilterUntilBlocked should accept a lambda by rvalue reference
https://bugs.webkit.org/show_bug.cgi?id=153057

Reviewed by Dan Bernstein.

No new tests. No change in behavior.

Instead of having ContentFilter::forEachContentFilterUntilBlocked() take a std::function, just have it take an
rvalue reference to the lambda its passed.

* loader/ContentFilter.cpp:
(WebCore::ContentFilter::forEachContentFilterUntilBlocked):
* loader/ContentFilter.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (194955 => 194956)


--- trunk/Source/WebCore/ChangeLog	2016-01-13 06:47:10 UTC (rev 194955)
+++ trunk/Source/WebCore/ChangeLog	2016-01-13 06:58:34 UTC (rev 194956)
@@ -1,3 +1,19 @@
+2016-01-12  Andy Estes  <[email protected]>
+
+        [Content Filtering] forEachContentFilterUntilBlocked should accept a lambda by rvalue reference
+        https://bugs.webkit.org/show_bug.cgi?id=153057
+
+        Reviewed by Dan Bernstein.
+
+        No new tests. No change in behavior.
+
+        Instead of having ContentFilter::forEachContentFilterUntilBlocked() take a std::function, just have it take an
+        rvalue reference to the lambda its passed.
+
+        * loader/ContentFilter.cpp:
+        (WebCore::ContentFilter::forEachContentFilterUntilBlocked):
+        * loader/ContentFilter.h:
+
 2016-01-12  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Fix return value of some paint methods in RenderThemeGtk

Modified: trunk/Source/WebCore/loader/ContentFilter.cpp (194955 => 194956)


--- trunk/Source/WebCore/loader/ContentFilter.cpp	2016-01-13 06:47:10 UTC (rev 194955)
+++ trunk/Source/WebCore/loader/ContentFilter.cpp	2016-01-13 06:58:34 UTC (rev 194956)
@@ -204,7 +204,8 @@
     return m_state != State::Blocked;
 }
 
-void ContentFilter::forEachContentFilterUntilBlocked(std::function<void(PlatformContentFilter&)> function)
+template <typename Function>
+inline void ContentFilter::forEachContentFilterUntilBlocked(Function&& function)
 {
     bool allFiltersAllowedLoad { true };
     for (auto& contentFilter : m_contentFilters) {

Modified: trunk/Source/WebCore/loader/ContentFilter.h (194955 => 194956)


--- trunk/Source/WebCore/loader/ContentFilter.h	2016-01-13 06:47:10 UTC (rev 194955)
+++ trunk/Source/WebCore/loader/ContentFilter.h	2016-01-13 06:58:34 UTC (rev 194956)
@@ -79,7 +79,7 @@
     friend std::unique_ptr<ContentFilter> std::make_unique<ContentFilter>(Container&&, DocumentLoader&);
     ContentFilter(Container, DocumentLoader&);
 
-    void forEachContentFilterUntilBlocked(std::function<void(PlatformContentFilter&)>);
+    template <typename Function> void forEachContentFilterUntilBlocked(Function&&);
     void didDecide(State);
     void deliverResourceData(CachedResource&);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to