Title: [164361] trunk/Source/WebCore
Revision
164361
Author
[email protected]
Date
2014-02-19 01:45:25 -0800 (Wed, 19 Feb 2014)

Log Message

Replace WTF::bind() uses in RTCPeerConnection with C++11 lambdas
https://bugs.webkit.org/show_bug.cgi?id=129001

Reviewed by Eric Carlson.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::setLocalDescription): Pass a lambda function to
callOnMainThread() instead of using WTF::bind().
(WebCore::RTCPeerConnection::setRemoteDescription): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (164360 => 164361)


--- trunk/Source/WebCore/ChangeLog	2014-02-19 09:41:17 UTC (rev 164360)
+++ trunk/Source/WebCore/ChangeLog	2014-02-19 09:45:25 UTC (rev 164361)
@@ -1,3 +1,15 @@
+2014-02-19  Zan Dobersek  <[email protected]>
+
+        Replace WTF::bind() uses in RTCPeerConnection with C++11 lambdas
+        https://bugs.webkit.org/show_bug.cgi?id=129001
+
+        Reviewed by Eric Carlson.
+
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::setLocalDescription): Pass a lambda function to
+        callOnMainThread() instead of using WTF::bind().
+        (WebCore::RTCPeerConnection::setRemoteDescription): Ditto.
+
 2014-02-19  Dan Bernstein  <[email protected]>
 
         Simplify PLATFORM(MAC) && !PLATFORM(IOS) and similar expressions

Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (164360 => 164361)


--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp	2014-02-19 09:41:17 UTC (rev 164360)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp	2014-02-19 09:45:25 UTC (rev 164361)
@@ -62,7 +62,6 @@
 #include "RTCVoidRequestImpl.h"
 #include "ScriptExecutionContext.h"
 #include "VoidCallback.h"
-#include <wtf/Functional.h>
 #include <wtf/MainThread.h>
 
 namespace WebCore {
@@ -250,8 +249,10 @@
     }
 
     if (!checkStateForLocalDescription(sessionDescription.get())) {
-        RefPtr<DOMError> error = DOMError::create(RTCPeerConnectionHandler::invalidSessionDescriptionErrorName());
-        callOnMainThread(bind(&RTCPeerConnectionErrorCallback::handleEvent, errorCallback.get(), error.release()));
+        callOnMainThread([=] {
+            RefPtr<DOMError> error = DOMError::create(RTCPeerConnectionHandler::invalidSessionDescriptionErrorName());
+            errorCallback->handleEvent(error.get());
+        });
         return;
     }
 
@@ -285,8 +286,10 @@
     }
 
     if (!checkStateForRemoteDescription(sessionDescription.get())) {
-        RefPtr<DOMError> error = DOMError::create(RTCPeerConnectionHandler::invalidSessionDescriptionErrorName());
-        callOnMainThread(bind(&RTCPeerConnectionErrorCallback::handleEvent, errorCallback.get(), error.release()));
+        callOnMainThread([=] {
+            RefPtr<DOMError> error = DOMError::create(RTCPeerConnectionHandler::invalidSessionDescriptionErrorName());
+            errorCallback->handleEvent(error.get());
+        });
         return;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to