| Index: third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp
|
| diff --git a/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp b/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp
|
| index e054159b48fa66e7f0baded20dda34d587a2fde4..a3e9296d62beed77132f4f9de44078ee1962c726 100644
|
| --- a/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp
|
| +++ b/third_party/WebKit/Source/modules/mediastream/RTCDataChannel.cpp
|
| @@ -33,6 +33,8 @@
|
| #include "core/fileapi/Blob.h"
|
| #include "modules/mediastream/RTCPeerConnection.h"
|
| #include "public/platform/WebRTCPeerConnectionHandler.h"
|
| +#include "wtf/PtrUtil.h"
|
| +#include <memory>
|
|
|
| namespace blink {
|
|
|
| @@ -51,7 +53,7 @@ static void throwNoBlobSupportException(ExceptionState& exceptionState)
|
| exceptionState.throwDOMException(NotSupportedError, "Blob support not implemented yet");
|
| }
|
|
|
| -RTCDataChannel* RTCDataChannel::create(ExecutionContext* context, PassOwnPtr<WebRTCDataChannelHandler> handler)
|
| +RTCDataChannel* RTCDataChannel::create(ExecutionContext* context, std::unique_ptr<WebRTCDataChannelHandler> handler)
|
| {
|
| DCHECK(handler);
|
| RTCDataChannel* channel = new RTCDataChannel(context, std::move(handler));
|
| @@ -62,7 +64,7 @@ RTCDataChannel* RTCDataChannel::create(ExecutionContext* context, PassOwnPtr<Web
|
|
|
| RTCDataChannel* RTCDataChannel::create(ExecutionContext* context, WebRTCPeerConnectionHandler* peerConnectionHandler, const String& label, const WebRTCDataChannelInit& init, ExceptionState& exceptionState)
|
| {
|
| - OwnPtr<WebRTCDataChannelHandler> handler = adoptPtr(peerConnectionHandler->createDataChannel(label, init));
|
| + std::unique_ptr<WebRTCDataChannelHandler> handler = wrapUnique(peerConnectionHandler->createDataChannel(label, init));
|
| if (!handler) {
|
| exceptionState.throwDOMException(NotSupportedError, "RTCDataChannel is not supported");
|
| return nullptr;
|
| @@ -73,7 +75,7 @@ RTCDataChannel* RTCDataChannel::create(ExecutionContext* context, WebRTCPeerConn
|
| return channel;
|
| }
|
|
|
| -RTCDataChannel::RTCDataChannel(ExecutionContext* context, PassOwnPtr<WebRTCDataChannelHandler> handler)
|
| +RTCDataChannel::RTCDataChannel(ExecutionContext* context, std::unique_ptr<WebRTCDataChannelHandler> handler)
|
| : ActiveScriptWrappable(this)
|
| , ActiveDOMObject(context)
|
| , m_handler(std::move(handler))
|
|
|