Index: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp |
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp |
index 1fc84a1ffb378e7736b24eb025d1abcb1764f0c8..41ddd90b0eff40a3cb631ebd445427a59120682a 100644 |
--- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp |
+++ b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp |
@@ -100,36 +100,10 @@ bool throwExceptionIfSignalingStateClosed(RTCPeerConnection::SignalingState stat |
return false; |
} |
-// Helper class for running error callbacks asynchronously |
-class ErrorCallbackTask : public WebTaskRunner::Task { |
-public: |
- static PassOwnPtr<ErrorCallbackTask> create(RTCPeerConnectionErrorCallback* errorCallback, DOMException* exception) |
- { |
- return adoptPtr(new ErrorCallbackTask(errorCallback, exception)); |
- } |
- |
- ~ErrorCallbackTask() override = default; |
- |
- void run() override |
- { |
- m_errorCallback->handleEvent(m_exception); |
- } |
- |
-private: |
- ErrorCallbackTask(RTCPeerConnectionErrorCallback* errorCallback, DOMException* exception) |
- : m_errorCallback(errorCallback) |
- , m_exception(exception) |
- { |
- ASSERT(errorCallback); |
- } |
- |
- Persistent<RTCPeerConnectionErrorCallback> m_errorCallback; |
- Persistent<DOMException> m_exception; |
-}; |
- |
void asyncCallErrorCallback(RTCPeerConnectionErrorCallback* errorCallback, DOMException* exception) |
{ |
- Microtask::enqueueMicrotask(ErrorCallbackTask::create(errorCallback, exception)); |
+ ASSERT(errorCallback); |
+ Microtask::enqueueMicrotask(bind(&RTCPeerConnectionErrorCallback::handleEvent, errorCallback, exception)); |
} |
bool callErrorCallbackIfSignalingStateClosed(RTCPeerConnection::SignalingState state, RTCPeerConnectionErrorCallback* errorCallback) |