Title: [117777] trunk/Source/WebKit2
Revision
117777
Author
[email protected]
Date
2012-05-21 06:49:48 -0700 (Mon, 21 May 2012)

Log Message

Disambiguate WTF::bind and std::bind from C++11
https://bugs.webkit.org/show_bug.cgi?id=86465

Patch by Allan Sandfeld Jensen <[email protected]> on 2012-05-21
Reviewed by Darin Adler.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::SyncMessageState::processIncomingMessage):
(CoreIPC::Connection::addQueueClient):
(CoreIPC::Connection::removeQueueClient):
(CoreIPC::Connection::invalidate):
(CoreIPC::Connection::sendMessage):
(CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
(CoreIPC::Connection::connectionDidClose):
(CoreIPC::Connection::enqueueIncomingMessage):
* Platform/CoreIPC/unix/ConnectionUnix.cpp:
(CoreIPC::Connection::open):
(CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::pluginThreadAsyncCall):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (117776 => 117777)


--- trunk/Source/WebKit2/ChangeLog	2012-05-21 13:49:40 UTC (rev 117776)
+++ trunk/Source/WebKit2/ChangeLog	2012-05-21 13:49:48 UTC (rev 117777)
@@ -1,3 +1,27 @@
+2012-05-21  Allan Sandfeld Jensen  <[email protected]>
+
+        Disambiguate WTF::bind and std::bind from C++11
+        https://bugs.webkit.org/show_bug.cgi?id=86465
+
+        Reviewed by Darin Adler.
+
+        * Platform/CoreIPC/Connection.cpp:
+        (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
+        (CoreIPC::Connection::addQueueClient):
+        (CoreIPC::Connection::removeQueueClient):
+        (CoreIPC::Connection::invalidate):
+        (CoreIPC::Connection::sendMessage):
+        (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
+        (CoreIPC::Connection::connectionDidClose):
+        (CoreIPC::Connection::enqueueIncomingMessage):
+        * Platform/CoreIPC/unix/ConnectionUnix.cpp:
+        (CoreIPC::Connection::open):
+        (CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination):
+        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+        (WebKit::NetscapePlugin::pluginThreadAsyncCall):
+        * WebProcess/WebPage/FindController.cpp:
+        (WebKit::FindController::findString):
+
 2012-05-20  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Add GCancellable parameter to all methods using gio async pattern

Modified: trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp (117776 => 117777)


--- trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp	2012-05-21 13:49:40 UTC (rev 117776)
+++ trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp	2012-05-21 13:49:48 UTC (rev 117777)
@@ -31,7 +31,6 @@
 #include <WebCore/RunLoop.h>
 #include <wtf/CurrentTime.h>
 
-using namespace std;
 using namespace WebCore;
 
 namespace CoreIPC {
@@ -141,7 +140,7 @@
         MutexLocker locker(m_mutex);
         
         if (!m_didScheduleDispatchMessagesWork) {
-            m_runLoop->dispatch(bind(&SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesWork, this));
+            m_runLoop->dispatch(WTF::bind(&SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesWork, this));
             m_didScheduleDispatchMessagesWork = true;
         }
 
@@ -236,12 +235,12 @@
 
 void Connection::addQueueClient(QueueClient* queueClient)
 {
-    m_connectionQueue.dispatch(bind(&Connection::addQueueClientOnWorkQueue, this, queueClient));
+    m_connectionQueue.dispatch(WTF::bind(&Connection::addQueueClientOnWorkQueue, this, queueClient));
 }
 
 void Connection::removeQueueClient(QueueClient* queueClient)
 {
-    m_connectionQueue.dispatch(bind(&Connection::removeQueueClientOnWorkQueue, this, queueClient));
+    m_connectionQueue.dispatch(WTF::bind(&Connection::removeQueueClientOnWorkQueue, this, queueClient));
 }
 
 void Connection::addQueueClientOnWorkQueue(QueueClient* queueClient)
@@ -274,7 +273,7 @@
     // Reset the client.
     m_client = 0;
 
-    m_connectionQueue.dispatch(bind(&Connection::platformInvalidate, this));
+    m_connectionQueue.dispatch(WTF::bind(&Connection::platformInvalidate, this));
 }
 
 void Connection::markCurrentlyDispatchedMessageAsInvalid()
@@ -317,7 +316,7 @@
     m_outgoingMessages.append(OutgoingMessage(messageID, arguments));
     
     // FIXME: We should add a boolean flag so we don't call this when work has already been scheduled.
-    m_connectionQueue.dispatch(bind(&Connection::sendOutgoingMessages, this));
+    m_connectionQueue.dispatch(WTF::bind(&Connection::sendOutgoingMessages, this));
     return true;
 }
 
@@ -565,7 +564,7 @@
 
 void Connection::postConnectionDidCloseOnConnectionWorkQueue()
 {
-    m_connectionQueue.dispatch(bind(&Connection::connectionDidClose, this));
+    m_connectionQueue.dispatch(WTF::bind(&Connection::connectionDidClose, this));
 }
 
 void Connection::connectionDidClose()
@@ -586,7 +585,7 @@
     if (m_didCloseOnConnectionWorkQueueCallback)
         m_didCloseOnConnectionWorkQueueCallback(m_connectionQueue, this);
 
-    m_clientRunLoop->dispatch(bind(&Connection::dispatchConnectionDidClose, this));
+    m_clientRunLoop->dispatch(WTF::bind(&Connection::dispatchConnectionDidClose, this));
 }
 
 void Connection::dispatchConnectionDidClose()
@@ -666,7 +665,7 @@
     MutexLocker locker(m_incomingMessagesLock);
     m_incomingMessages.append(incomingMessage);
 
-    m_clientRunLoop->dispatch(bind(&Connection::dispatchOneMessage, this));
+    m_clientRunLoop->dispatch(WTF::bind(&Connection::dispatchOneMessage, this));
 }
 
 void Connection::dispatchMessage(IncomingMessage& message)

Modified: trunk/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp (117776 => 117777)


--- trunk/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp	2012-05-21 13:49:40 UTC (rev 117776)
+++ trunk/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp	2012-05-21 13:49:48 UTC (rev 117777)
@@ -45,8 +45,6 @@
 #include <glib.h>
 #endif
 
-using namespace std;
-
 namespace CoreIPC {
 
 static const size_t messageMaxSize = 4096;
@@ -423,17 +421,17 @@
 
     m_isConnected = true;
 #if PLATFORM(QT)
-    m_socketNotifier = m_connectionQueue.registerSocketEventHandler(m_socketDescriptor, QSocketNotifier::Read, bind(&Connection::readyReadHandler, this));
+    m_socketNotifier = m_connectionQueue.registerSocketEventHandler(m_socketDescriptor, QSocketNotifier::Read, WTF::bind(&Connection::readyReadHandler, this));
 #elif PLATFORM(GTK)
-    m_connectionQueue.registerEventSourceHandler(m_socketDescriptor, (G_IO_HUP | G_IO_ERR), bind(&Connection::connectionDidClose, this));
-    m_connectionQueue.registerEventSourceHandler(m_socketDescriptor, G_IO_IN, bind(&Connection::readyReadHandler, this));
+    m_connectionQueue.registerEventSourceHandler(m_socketDescriptor, (G_IO_HUP | G_IO_ERR), WTF::bind(&Connection::connectionDidClose, this));
+    m_connectionQueue.registerEventSourceHandler(m_socketDescriptor, G_IO_IN, WTF::bind(&Connection::readyReadHandler, this));
 #elif PLATFORM(EFL)
-    m_connectionQueue.registerSocketEventHandler(m_socketDescriptor, bind(&Connection::readyReadHandler, this));
+    m_connectionQueue.registerSocketEventHandler(m_socketDescriptor, WTF::bind(&Connection::readyReadHandler, this));
 #endif
 
     // Schedule a call to readyReadHandler. Data may have arrived before installation of the signal
     // handler.
-    m_connectionQueue.dispatch(bind(&Connection::readyReadHandler, this));
+    m_connectionQueue.dispatch(WTF::bind(&Connection::readyReadHandler, this));
 
     return true;
 }
@@ -561,7 +559,7 @@
 #if PLATFORM(QT)
 void Connection::setShouldCloseConnectionOnProcessTermination(WebKit::PlatformProcessIdentifier process)
 {
-    m_connectionQueue.dispatchOnTermination(process, bind(&Connection::connectionDidClose, this));
+    m_connectionQueue.dispatchOnTermination(process, WTF::bind(&Connection::connectionDidClose, this));
 }
 #endif
 

Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (117776 => 117777)


--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp	2012-05-21 13:49:40 UTC (rev 117776)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp	2012-05-21 13:49:48 UTC (rev 117777)
@@ -310,7 +310,7 @@
 
 void NetscapePlugin::pluginThreadAsyncCall(void (*function)(void*), void* userData)
 {
-    RunLoop::main()->dispatch(bind(&NetscapePlugin::handlePluginThreadAsyncCall, this, function, userData));
+    RunLoop::main()->dispatch(WTF::bind(&NetscapePlugin::handlePluginThreadAsyncCall, this, function, userData));
 }
     
 void NetscapePlugin::handlePluginThreadAsyncCall(void (*function)(void*), void* userData)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp (117776 => 117777)


--- trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp	2012-05-21 13:49:40 UTC (rev 117776)
+++ trunk/Source/WebKit2/WebProcess/WebPage/FindController.cpp	2012-05-21 13:49:48 UTC (rev 117777)
@@ -156,7 +156,7 @@
 
     bool found = m_webPage->corePage()->findString(string, core(options));
 
-    m_webPage->drawingArea()->dispatchAfterEnsuringUpdatedScrollPosition(bind(&FindController::updateFindUIAfterPageScroll, this, found, string, options, maxMatchCount));
+    m_webPage->drawingArea()->dispatchAfterEnsuringUpdatedScrollPosition(WTF::bind(&FindController::updateFindUIAfterPageScroll, this, found, string, options, maxMatchCount));
 }
 
 void FindController::hideFindUI()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to