Changeset 161253 in webkit
- Timestamp:
- Jan 2, 2014 11:40:40 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r161246 r161253 1 2014-01-02 Zan Dobersek <zdobersek@igalia.com> 2 3 [GTK] Switch from WTF::Function to std::function in WebProcessTest 4 https://bugs.webkit.org/show_bug.cgi?id=126397 5 6 Reviewed by Anders Carlsson. 7 8 Use std::function<> and std::bind() instead of WTF::Function and WTF::bind, 9 following the effort of using STL concepts where possible. 10 11 * UIProcess/API/gtk/tests/WebProcessTest.cpp: 12 (WebProcessTest::add): 13 * UIProcess/API/gtk/tests/WebProcessTest.h: 14 1 15 2014-01-02 Gavin Barraclough <barraclough@apple.com> 2 16 -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.cpp
r153327 r161253 24 24 #include <wtf/gobject/GOwnPtr.h> 25 25 26 typedef HashMap<String, Function<PassOwnPtr<WebProcessTest>()>> TestsMap;26 typedef HashMap<String, std::function<PassOwnPtr<WebProcessTest> ()>> TestsMap; 27 27 static TestsMap& testsMap() 28 28 { … … 31 31 } 32 32 33 void WebProcessTest::add(const String& testName, Function<PassOwnPtr<WebProcessTest>()> closure)33 void WebProcessTest::add(const String& testName, std::function<PassOwnPtr<WebProcessTest> ()> closure) 34 34 { 35 testsMap().add(testName, closure);35 testsMap().add(testName, std::forward<std::function<PassOwnPtr<WebProcessTest> ()>>(closure)); 36 36 } 37 37 -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/WebProcessTest.h
r153327 r161253 19 19 20 20 #include <webkit2/webkit-web-extension.h> 21 #include <wtf/Functional.h>22 21 #include <wtf/HashMap.h> 23 22 #include <wtf/PassOwnPtr.h> … … 31 30 virtual bool runTest(const char* testName, WebKitWebExtension*, GVariant* args) = 0; 32 31 33 static void add(const String& testName, Function<PassOwnPtr<WebProcessTest>()>);32 static void add(const String& testName, std::function<PassOwnPtr<WebProcessTest> ()>); 34 33 static PassOwnPtr<WebProcessTest> create(const String& testName); 35 34 }; 36 35 37 36 #define REGISTER_TEST(ClassName, TestName) \ 38 WebProcessTest::add(String::fromUTF8(TestName), WTF::bind(&ClassName::create))37 WebProcessTest::add(String::fromUTF8(TestName), ClassName::create) 39 38
Note: See TracChangeset
for help on using the changeset viewer.