⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 201880 in webkit


Ignore:
Timestamp:
Jun 9, 2016, 1:10:30 PM (10 years ago)
Author:
achristensen@apple.com
Message:

Clean up WebSocket code
​https://bugs.webkit.org/show_bug.cgi?id=158551

Reviewed by Darin Adler.

Source/WebCore:

No new tests. There is no change in behavior.
There seems to be no reason why SocketStreamHandle should be an AuthenticationClient.

  • Modules/websockets/ThreadableWebSocketChannel.h:
  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:

(WebCore::ThreadableWebSocketChannelClientWrapper::setSendRequestResult):
(WebCore::ThreadableWebSocketChannelClientWrapper::bufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::setBufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
(WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
(WebCore::ThreadableWebSocketChannelClientWrapper::didClose):

  • Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
  • Modules/websockets/WebSocket.cpp:

(WebCore::joinStrings):
(WebCore::saturateAdd):
(WebCore::WebSocket::send):
(WebCore::WebSocket::readyState):
(WebCore::WebSocket::bufferedAmount):
(WebCore::WebSocket::didReceiveBinaryData):
(WebCore::WebSocket::didReceiveMessageError):
(WebCore::WebSocket::didUpdateBufferedAmount):
(WebCore::WebSocket::didStartClosingHandshake):
(WebCore::WebSocket::didClose):

  • Modules/websockets/WebSocket.h:
  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::~WebSocketChannel):
(WebCore::WebSocketChannel::send):
(WebCore::WebSocketChannel::bufferedAmount):
(WebCore::WebSocketChannel::resume):
(WebCore::WebSocketChannel::willOpenSocketStream):
(WebCore::WebSocketChannel::didOpenSocketStream):
(WebCore::WebSocketChannel::didCloseSocketStream):
(WebCore::WebSocketChannel::didReceiveSocketStreamData):
(WebCore::WebSocketChannel::didUpdateBufferedAmount):
(WebCore::WebSocketChannel::didFailSocketStream):
(WebCore::WebSocketChannel::didStartLoading):
(WebCore::WebSocketChannel::appendToBuffer):
(WebCore::WebSocketChannel::processBuffer):
(WebCore::WebSocketChannel::resumeTimerFired):
(WebCore::WebSocketChannel::startClosingHandshake):
(WebCore::WebSocketChannel::didReceiveAuthenticationChallenge): Deleted.
(WebCore::WebSocketChannel::didCancelAuthenticationChallenge): Deleted.

  • Modules/websockets/WebSocketChannel.h:
  • Modules/websockets/WebSocketChannelClient.h:

(WebCore::WebSocketChannelClient::~WebSocketChannelClient):
(WebCore::WebSocketChannelClient::didConnect):
(WebCore::WebSocketChannelClient::didReceiveMessage):
(WebCore::WebSocketChannelClient::didReceiveBinaryData):
(WebCore::WebSocketChannelClient::didReceiveMessageError):
(WebCore::WebSocketChannelClient::didUpdateBufferedAmount):
(WebCore::WebSocketChannelClient::didStartClosingHandshake):
(WebCore::WebSocketChannelClient::didClose):
(WebCore::WebSocketChannelClient::WebSocketChannelClient):

  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp:

(WebCore::WorkerThreadableWebSocketChannel::send):
(WebCore::WorkerThreadableWebSocketChannel::bufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):

  • Modules/websockets/WorkerThreadableWebSocketChannel.h:
  • platform/network/BlobData.cpp:

(WebCore::BlobData::appendData):
(WebCore::BlobData::appendFile):

  • platform/network/BlobData.h:

(WebCore::BlobDataItem::BlobDataItem):

  • platform/network/BlobRegistry.h:
  • platform/network/BlobRegistryImpl.cpp:

(WebCore::BlobRegistryImpl::appendStorageItems):
(WebCore::BlobRegistryImpl::registerFileBlobURL):
(WebCore::BlobRegistryImpl::registerBlobURL):
(WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked):
(WebCore::BlobRegistryImpl::registerBlobURLForSlice):

  • platform/network/BlobRegistryImpl.h:
  • platform/network/SocketStreamHandleBase.cpp:

(WebCore::SocketStreamHandleBase::send):
(WebCore::SocketStreamHandleBase::disconnect):
(WebCore::SocketStreamHandleBase::sendPendingData):

  • platform/network/SocketStreamHandleBase.h:
  • platform/network/SocketStreamHandleClient.h:

(WebCore::SocketStreamHandleClient::~SocketStreamHandleClient):
(WebCore::SocketStreamHandleClient::willOpenSocketStream):
(WebCore::SocketStreamHandleClient::didOpenSocketStream):
(WebCore::SocketStreamHandleClient::didCloseSocketStream):
(WebCore::SocketStreamHandleClient::didReceiveSocketStreamData):
(WebCore::SocketStreamHandleClient::didUpdateBufferedAmount):
(WebCore::SocketStreamHandleClient::didFailSocketStream):
(WebCore::SocketStreamHandleClient::didReceiveAuthenticationChallenge): Deleted.
(WebCore::SocketStreamHandleClient::didCancelAuthenticationChallenge): Deleted.

  • platform/network/cf/SocketStreamHandle.h:

(WebCore::SocketStreamHandle::create):
(WebCore::SocketStreamHandle::refAuthenticationClient): Deleted.
(WebCore::SocketStreamHandle::derefAuthenticationClient): Deleted.

  • platform/network/cf/SocketStreamHandleCFNet.cpp:

(WebCore::SocketStreamHandle::SocketStreamHandle):
(WebCore::SocketStreamHandle::addCONNECTCredentials):
(WebCore::SocketStreamHandle::copyCFStreamDescription):
(WebCore::SocketStreamHandle::readStreamCallback):
(WebCore::SocketStreamHandle::writeStreamCallback):
(WebCore::SocketStreamHandle::reportErrorToClient):
(WebCore::SocketStreamHandle::~SocketStreamHandle):
(WebCore::SocketStreamHandle::platformClose):
(WebCore::SocketStreamHandle::port):
(WebCore::SocketStreamHandle::receivedCredential): Deleted.
(WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): Deleted.
(WebCore::SocketStreamHandle::receivedCancellation): Deleted.
(WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Deleted.
(WebCore::SocketStreamHandle::receivedChallengeRejection): Deleted.

  • platform/network/curl/ResourceHandleCurl.cpp:
  • platform/network/curl/SocketStreamHandle.h:

(WebCore::SocketStreamHandle::SocketData::SocketData):

  • platform/network/curl/SocketStreamHandleCurl.cpp:

(WebCore::SocketStreamHandle::platformClose):
(WebCore::SocketStreamHandle::readData):
(WebCore::SocketStreamHandle::didReceiveData):
(WebCore::SocketStreamHandle::didOpenSocket):
(WebCore::SocketStreamHandle::createCopy):
(WebCore::SocketStreamHandle::didReceiveAuthenticationChallenge): Deleted.
(WebCore::SocketStreamHandle::receivedCredential): Deleted.
(WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): Deleted.
(WebCore::SocketStreamHandle::receivedCancellation): Deleted.
(WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Deleted.
(WebCore::SocketStreamHandle::receivedChallengeRejection): Deleted.

  • platform/network/soup/SocketStreamHandle.h:

(WebCore::SocketStreamHandle::create):

  • platform/network/soup/SocketStreamHandleSoup.cpp:

(WebCore::getHandleFromId):
(WebCore::deactivateHandle):
(WebCore::activateHandle):
(WebCore::SocketStreamHandle::SocketStreamHandle):
(WebCore::SocketStreamHandle::~SocketStreamHandle):
(WebCore::SocketStreamHandle::connected):
(WebCore::SocketStreamHandle::readBytes):
(WebCore::SocketStreamHandle::platformSend):
(WebCore::SocketStreamHandle::platformClose):
(WebCore::SocketStreamHandle::beginWaitingForSocketWritability):
(WebCore::SocketStreamHandle::didReceiveAuthenticationChallenge): Deleted.
(WebCore::SocketStreamHandle::receivedCredential): Deleted.
(WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): Deleted.
(WebCore::SocketStreamHandle::receivedCancellation): Deleted.
(WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Deleted.
(WebCore::SocketStreamHandle::receivedChallengeRejection): Deleted.

Source/WebKit2:

  • WebProcess/FileAPI/BlobRegistryProxy.cpp:

(WebKit::BlobRegistryProxy::registerFileBlobURL):

  • WebProcess/FileAPI/BlobRegistryProxy.h:
Location:
trunk/Source
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r201877 r201880  
     12016-06-09  Alex Christensen  <achristensen@webkit.org>
     2
     3        Clean up WebSocket code
     4        https://bugs.webkit.org/show_bug.cgi?id=158551
     5
     6        Reviewed by Darin Adler.
     7
     8        No new tests.  There is no change in behavior.
     9        There seems to be no reason why SocketStreamHandle should be an AuthenticationClient.
     10
     11        * Modules/websockets/ThreadableWebSocketChannel.h:
     12        * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
     13        (WebCore::ThreadableWebSocketChannelClientWrapper::setSendRequestResult):
     14        (WebCore::ThreadableWebSocketChannelClientWrapper::bufferedAmount):
     15        (WebCore::ThreadableWebSocketChannelClientWrapper::setBufferedAmount):
     16        (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
     17        (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
     18        (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
     19        (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
     20        * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
     21        * Modules/websockets/WebSocket.cpp:
     22        (WebCore::joinStrings):
     23        (WebCore::saturateAdd):
     24        (WebCore::WebSocket::send):
     25        (WebCore::WebSocket::readyState):
     26        (WebCore::WebSocket::bufferedAmount):
     27        (WebCore::WebSocket::didReceiveBinaryData):
     28        (WebCore::WebSocket::didReceiveMessageError):
     29        (WebCore::WebSocket::didUpdateBufferedAmount):
     30        (WebCore::WebSocket::didStartClosingHandshake):
     31        (WebCore::WebSocket::didClose):
     32        * Modules/websockets/WebSocket.h:
     33        * Modules/websockets/WebSocketChannel.cpp:
     34        (WebCore::WebSocketChannel::WebSocketChannel):
     35        (WebCore::WebSocketChannel::~WebSocketChannel):
     36        (WebCore::WebSocketChannel::send):
     37        (WebCore::WebSocketChannel::bufferedAmount):
     38        (WebCore::WebSocketChannel::resume):
     39        (WebCore::WebSocketChannel::willOpenSocketStream):
     40        (WebCore::WebSocketChannel::didOpenSocketStream):
     41        (WebCore::WebSocketChannel::didCloseSocketStream):
     42        (WebCore::WebSocketChannel::didReceiveSocketStreamData):
     43        (WebCore::WebSocketChannel::didUpdateBufferedAmount):
     44        (WebCore::WebSocketChannel::didFailSocketStream):
     45        (WebCore::WebSocketChannel::didStartLoading):
     46        (WebCore::WebSocketChannel::appendToBuffer):
     47        (WebCore::WebSocketChannel::processBuffer):
     48        (WebCore::WebSocketChannel::resumeTimerFired):
     49        (WebCore::WebSocketChannel::startClosingHandshake):
     50        (WebCore::WebSocketChannel::didReceiveAuthenticationChallenge): Deleted.
     51        (WebCore::WebSocketChannel::didCancelAuthenticationChallenge): Deleted.
     52        * Modules/websockets/WebSocketChannel.h:
     53        * Modules/websockets/WebSocketChannelClient.h:
     54        (WebCore::WebSocketChannelClient::~WebSocketChannelClient):
     55        (WebCore::WebSocketChannelClient::didConnect):
     56        (WebCore::WebSocketChannelClient::didReceiveMessage):
     57        (WebCore::WebSocketChannelClient::didReceiveBinaryData):
     58        (WebCore::WebSocketChannelClient::didReceiveMessageError):
     59        (WebCore::WebSocketChannelClient::didUpdateBufferedAmount):
     60        (WebCore::WebSocketChannelClient::didStartClosingHandshake):
     61        (WebCore::WebSocketChannelClient::didClose):
     62        (WebCore::WebSocketChannelClient::WebSocketChannelClient):
     63        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
     64        (WebCore::WorkerThreadableWebSocketChannel::send):
     65        (WebCore::WorkerThreadableWebSocketChannel::bufferedAmount):
     66        (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
     67        (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
     68        (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
     69        (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
     70        (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
     71        (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
     72        (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
     73        * Modules/websockets/WorkerThreadableWebSocketChannel.h:
     74        * platform/network/BlobData.cpp:
     75        (WebCore::BlobData::appendData):
     76        (WebCore::BlobData::appendFile):
     77        * platform/network/BlobData.h:
     78        (WebCore::BlobDataItem::BlobDataItem):
     79        * platform/network/BlobRegistry.h:
     80        * platform/network/BlobRegistryImpl.cpp:
     81        (WebCore::BlobRegistryImpl::appendStorageItems):
     82        (WebCore::BlobRegistryImpl::registerFileBlobURL):
     83        (WebCore::BlobRegistryImpl::registerBlobURL):
     84        (WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked):
     85        (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
     86        * platform/network/BlobRegistryImpl.h:
     87        * platform/network/SocketStreamHandleBase.cpp:
     88        (WebCore::SocketStreamHandleBase::send):
     89        (WebCore::SocketStreamHandleBase::disconnect):
     90        (WebCore::SocketStreamHandleBase::sendPendingData):
     91        * platform/network/SocketStreamHandleBase.h:
     92        * platform/network/SocketStreamHandleClient.h:
     93        (WebCore::SocketStreamHandleClient::~SocketStreamHandleClient):
     94        (WebCore::SocketStreamHandleClient::willOpenSocketStream):
     95        (WebCore::SocketStreamHandleClient::didOpenSocketStream):
     96        (WebCore::SocketStreamHandleClient::didCloseSocketStream):
     97        (WebCore::SocketStreamHandleClient::didReceiveSocketStreamData):
     98        (WebCore::SocketStreamHandleClient::didUpdateBufferedAmount):
     99        (WebCore::SocketStreamHandleClient::didFailSocketStream):
     100        (WebCore::SocketStreamHandleClient::didReceiveAuthenticationChallenge): Deleted.
     101        (WebCore::SocketStreamHandleClient::didCancelAuthenticationChallenge): Deleted.
     102        * platform/network/cf/SocketStreamHandle.h:
     103        (WebCore::SocketStreamHandle::create):
     104        (WebCore::SocketStreamHandle::refAuthenticationClient): Deleted.
     105        (WebCore::SocketStreamHandle::derefAuthenticationClient): Deleted.
     106        * platform/network/cf/SocketStreamHandleCFNet.cpp:
     107        (WebCore::SocketStreamHandle::SocketStreamHandle):
     108        (WebCore::SocketStreamHandle::addCONNECTCredentials):
     109        (WebCore::SocketStreamHandle::copyCFStreamDescription):
     110        (WebCore::SocketStreamHandle::readStreamCallback):
     111        (WebCore::SocketStreamHandle::writeStreamCallback):
     112        (WebCore::SocketStreamHandle::reportErrorToClient):
     113        (WebCore::SocketStreamHandle::~SocketStreamHandle):
     114        (WebCore::SocketStreamHandle::platformClose):
     115        (WebCore::SocketStreamHandle::port):
     116        (WebCore::SocketStreamHandle::receivedCredential): Deleted.
     117        (WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): Deleted.
     118        (WebCore::SocketStreamHandle::receivedCancellation): Deleted.
     119        (WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Deleted.
     120        (WebCore::SocketStreamHandle::receivedChallengeRejection): Deleted.
     121        * platform/network/curl/ResourceHandleCurl.cpp:
     122        * platform/network/curl/SocketStreamHandle.h:
     123        (WebCore::SocketStreamHandle::SocketData::SocketData):
     124        * platform/network/curl/SocketStreamHandleCurl.cpp:
     125        (WebCore::SocketStreamHandle::platformClose):
     126        (WebCore::SocketStreamHandle::readData):
     127        (WebCore::SocketStreamHandle::didReceiveData):
     128        (WebCore::SocketStreamHandle::didOpenSocket):
     129        (WebCore::SocketStreamHandle::createCopy):
     130        (WebCore::SocketStreamHandle::didReceiveAuthenticationChallenge): Deleted.
     131        (WebCore::SocketStreamHandle::receivedCredential): Deleted.
     132        (WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): Deleted.
     133        (WebCore::SocketStreamHandle::receivedCancellation): Deleted.
     134        (WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Deleted.
     135        (WebCore::SocketStreamHandle::receivedChallengeRejection): Deleted.
     136        * platform/network/soup/SocketStreamHandle.h:
     137        (WebCore::SocketStreamHandle::create):
     138        * platform/network/soup/SocketStreamHandleSoup.cpp:
     139        (WebCore::getHandleFromId):
     140        (WebCore::deactivateHandle):
     141        (WebCore::activateHandle):
     142        (WebCore::SocketStreamHandle::SocketStreamHandle):
     143        (WebCore::SocketStreamHandle::~SocketStreamHandle):
     144        (WebCore::SocketStreamHandle::connected):
     145        (WebCore::SocketStreamHandle::readBytes):
     146        (WebCore::SocketStreamHandle::platformSend):
     147        (WebCore::SocketStreamHandle::platformClose):
     148        (WebCore::SocketStreamHandle::beginWaitingForSocketWritability):
     149        (WebCore::SocketStreamHandle::didReceiveAuthenticationChallenge): Deleted.
     150        (WebCore::SocketStreamHandle::receivedCredential): Deleted.
     151        (WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential): Deleted.
     152        (WebCore::SocketStreamHandle::receivedCancellation): Deleted.
     153        (WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Deleted.
     154        (WebCore::SocketStreamHandle::receivedChallengeRejection): Deleted.
     155
    11562016-06-09  Commit Queue  <commit-queue@webkit.org>
    2157
  • trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.h

    r201837 r201880  
    6666    virtual SendResult send(const JSC::ArrayBuffer&, unsigned byteOffset, unsigned byteLength) = 0;
    6767    virtual SendResult send(Blob&) = 0;
    68     virtual unsigned long bufferedAmount() const = 0;
     68    virtual unsigned bufferedAmount() const = 0;
    6969    virtual void close(int code, const String& reason) = 0;
    7070    // Log the reason text and close the connection. Will call didClose().
  • trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp

    r201837 r201880  
    137137}
    138138
    139 unsigned long ThreadableWebSocketChannelClientWrapper::bufferedAmount() const
     139unsigned ThreadableWebSocketChannelClientWrapper::bufferedAmount() const
    140140{
    141141    return m_bufferedAmount;
    142142}
    143143
    144 void ThreadableWebSocketChannelClientWrapper::setBufferedAmount(unsigned long bufferedAmount)
     144void ThreadableWebSocketChannelClientWrapper::setBufferedAmount(unsigned bufferedAmount)
    145145{
    146146    m_bufferedAmount = bufferedAmount;
    … …  
    186186}
    187187
    188 void ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount(unsigned long bufferedAmount)
     188void ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount(unsigned bufferedAmount)
    189189{
    190190    m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = Ref<ThreadableWebSocketChannelClientWrapper>(*this), bufferedAmount] (ScriptExecutionContext&) {
    … …  
    208208}
    209209
    210 void ThreadableWebSocketChannelClientWrapper::didClose(unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHandshakeCompletion, unsigned short code, const String& reason)
     210void ThreadableWebSocketChannelClientWrapper::didClose(unsigned unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHandshakeCompletion, unsigned short code, const String& reason)
    211211{
    212212    m_pendingTasks.append(std::make_unique<ScriptExecutionContext::Task>([this, protectedThis = Ref<ThreadableWebSocketChannelClientWrapper>(*this), unhandledBufferedAmount, closingHandshakeCompletion, code, reason = reason.isolatedCopy()] (ScriptExecutionContext&) {
  • trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannelClientWrapper.h

    r201837 r201880  
    7272    void setSendRequestResult(ThreadableWebSocketChannel::SendResult);
    7373
    74     unsigned long bufferedAmount() const;
    75     void setBufferedAmount(unsigned long);
     74    unsigned bufferedAmount() const;
     75    void setBufferedAmount(unsigned);
    7676
    7777    void clearClient();
    … …  
    8080    void didReceiveMessage(const String& message);
    8181    void didReceiveBinaryData(Vector<uint8_t>&&);
    82     void didUpdateBufferedAmount(unsigned long bufferedAmount);
     82    void didUpdateBufferedAmount(unsigned bufferedAmount);
    8383    void didStartClosingHandshake();
    84     void didClose(unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus, unsigned short code, const String& reason);
     84    void didClose(unsigned unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus, unsigned short code, const String& reason);
    8585    void didReceiveMessageError();
    8686
    … …  
    102102    Vector<UChar> m_extensions;
    103103    ThreadableWebSocketChannel::SendResult m_sendRequestResult;
    104     unsigned long m_bufferedAmount;
     104    unsigned m_bufferedAmount;
    105105    bool m_suspended;
    106106    Vector<std::unique_ptr<ScriptExecutionContext::Task>> m_pendingTasks;
  • trunk/Source/WebCore/Modules/websockets/WebSocket.cpp

    r201837 r201880  
    116116}
    117117
    118 static unsigned long saturateAdd(unsigned long a, unsigned long b)
    119 {
    120     if (std::numeric_limits<unsigned long>::max() - a < b)
    121         return std::numeric_limits<unsigned long>::max();
     118static unsigned saturateAdd(unsigned a, unsigned b)
     119{
     120    if (std::numeric_limits<unsigned>::max() - a < b)
     121        return std::numeric_limits<unsigned>::max();
    122122    return a + b;
    123123}
    … …  
    370370    }
    371371    if (m_state == CLOSING || m_state == CLOSED) {
    372         unsigned long payloadSize = static_cast<unsigned long>(binaryData.size());
     372        unsigned payloadSize = static_cast<unsigned>(binaryData.size());
    373373        m_bufferedAmountAfterClose = saturateAdd(m_bufferedAmountAfterClose, payloadSize);
    374374        m_bufferedAmountAfterClose = saturateAdd(m_bufferedAmountAfterClose, getFramingOverhead(payloadSize));
    … …  
    420420}
    421421
    422 unsigned long WebSocket::bufferedAmount() const
     422unsigned WebSocket::bufferedAmount() const
    423423{
    424424    return saturateAdd(m_bufferedAmount, m_bufferedAmountAfterClose);
    … …  
    567567void WebSocket::didReceiveBinaryData(Vector<uint8_t>&& binaryData)
    568568{
    569     LOG(Network, "WebSocket %p didReceiveBinaryData() %lu byte binary message", this, static_cast<unsigned long>(binaryData.size()));
     569    LOG(Network, "WebSocket %p didReceiveBinaryData() %u byte binary message", this, static_cast<unsigned>(binaryData.size()));
    570570    switch (m_binaryType) {
    571571    case BinaryTypeBlob:
    … …  
    587587}
    588588
    589 void WebSocket::didUpdateBufferedAmount(unsigned long bufferedAmount)
    590 {
    591     LOG(Network, "WebSocket %p didUpdateBufferedAmount() New bufferedAmount is %lu", this, bufferedAmount);
     589void WebSocket::didUpdateBufferedAmount(unsigned bufferedAmount)
     590{
     591    LOG(Network, "WebSocket %p didUpdateBufferedAmount() New bufferedAmount is %u", this, bufferedAmount);
    592592    if (m_state == CLOSED)
    593593        return;
    … …  
    601601}
    602602
    603 void WebSocket::didClose(unsigned long unhandledBufferedAmount, ClosingHandshakeCompletionStatus closingHandshakeCompletion, unsigned short code, const String& reason)
     603void WebSocket::didClose(unsigned unhandledBufferedAmount, ClosingHandshakeCompletionStatus closingHandshakeCompletion, unsigned short code, const String& reason)
    604604{
    605605    LOG(Network, "WebSocket %p didClose()", this);
  • trunk/Source/WebCore/Modules/websockets/WebSocket.h

    r200298 r201880  
    8181    const URL& url() const;
    8282    State readyState() const;
    83     unsigned long bufferedAmount() const;
     83    unsigned bufferedAmount() const;
    8484
    8585    String protocol() const;
    … …  
    101101    void didReceiveBinaryData(Vector<uint8_t>&&) override;
    102102    void didReceiveMessageError() override;
    103     void didUpdateBufferedAmount(unsigned long bufferedAmount) override;
     103    void didUpdateBufferedAmount(unsigned bufferedAmount) override;
    104104    void didStartClosingHandshake() override;
    105     void didClose(unsigned long unhandledBufferedAmount, ClosingHandshakeCompletionStatus, unsigned short code, const String& reason) override;
     105    void didClose(unsigned unhandledBufferedAmount, ClosingHandshakeCompletionStatus, unsigned short code, const String& reason) override;
    106106
    107107private:
    … …  
    134134    State m_state;
    135135    URL m_url;
    136     unsigned long m_bufferedAmount;
    137     unsigned long m_bufferedAmountAfterClose;
     136    unsigned m_bufferedAmount;
     137    unsigned m_bufferedAmountAfterClose;
    138138    BinaryType m_binaryType;
    139139    String m_subprotocol;
  • trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp

    r201837 r201880  
    6969    , m_client(&client)
    7070    , m_resumeTimer(*this, &WebSocketChannel::resumeTimerFired)
    71     , m_suspended(false)
    72     , m_closing(false)
    73     , m_receivedClosingHandshake(false)
    7471    , m_closingTimer(*this, &WebSocketChannel::closingTimerFired)
    75     , m_closed(false)
    76     , m_shouldDiscardReceivedData(false)
    77     , m_unhandledBufferedAmount(0)
    78     , m_identifier(0)
    79     , m_hasContinuousFrame(false)
    80     , m_closeEventCode(CloseEventCodeAbnormalClosure)
    81     , m_outgoingFrameQueueStatus(OutgoingFrameQueueOpen)
    82     , m_blobLoaderStatus(BlobLoaderNotStarted)
    8372{
    8473    if (Page* page = document.page())
    8574        m_identifier = page->progress().createUniqueIdentifier();
    8675
    87     LOG(Network, "WebSocketChannel %p ctor, identifier %lu", this, m_identifier);
     76    LOG(Network, "WebSocketChannel %p ctor, identifier %u", this, m_identifier);
    8877}
    8978
    … …  
    175164}
    176165
    177 unsigned long WebSocketChannel::bufferedAmount() const
     166unsigned WebSocketChannel::bufferedAmount() const
    178167{
    179168    LOG(Network, "WebSocketChannel %p bufferedAmount()", this);
    … …  
    254243}
    255244
    256 void WebSocketChannel::willOpenSocketStream(SocketStreamHandle*)
     245void WebSocketChannel::willOpenSocketStream(SocketStreamHandle&)
    257246{
    258247    LOG(Network, "WebSocketChannel %p willOpenSocketStream()", this);
    259248}
    260249
    261 void WebSocketChannel::didOpenSocketStream(SocketStreamHandle* handle)
     250void WebSocketChannel::didOpenSocketStream(SocketStreamHandle& handle)
    262251{
    263252    LOG(Network, "WebSocketChannel %p didOpenSocketStream()", this);
    264     ASSERT(handle == m_handle);
     253    ASSERT(&handle == m_handle);
    265254    if (!m_document)
    266255        return;
    … …  
    268257        InspectorInstrumentation::willSendWebSocketHandshakeRequest(m_document, m_identifier, m_handshake->clientHandshakeRequest());
    269258    CString handshakeMessage = m_handshake->clientHandshakeMessage();
    270     if (!handle->send(handshakeMessage.data(), handshakeMessage.length()))
     259    if (!handle.send(handshakeMessage.data(), handshakeMessage.length()))
    271260        fail("Failed to send WebSocket handshake.");
    272261}
    273262
    274 void WebSocketChannel::didCloseSocketStream(SocketStreamHandle* handle)
     263void WebSocketChannel::didCloseSocketStream(SocketStreamHandle& handle)
    275264{
    276265    LOG(Network, "WebSocketChannel %p didCloseSocketStream()", this);
    277266    if (m_identifier && m_document)
    278267        InspectorInstrumentation::didCloseWebSocket(m_document, m_identifier);
    279     ASSERT_UNUSED(handle, handle == m_handle || !m_handle);
     268    ASSERT_UNUSED(handle, &handle == m_handle || !m_handle);
    280269    m_closed = true;
    281270    if (m_closingTimer.isActive())
    … …  
    297286}
    298287
    299 void WebSocketChannel::didReceiveSocketStreamData(SocketStreamHandle* handle, const char* data, int len)
     288void WebSocketChannel::didReceiveSocketStreamData(SocketStreamHandle& handle, const char* data, int len)
    300289{
    301290    LOG(Network, "WebSocketChannel %p didReceiveSocketStreamData() Received %d bytes", this, len);
    302291    Ref<WebSocketChannel> protectedThis(*this); // The client can close the channel, potentially removing the last reference.
    303     ASSERT(handle == m_handle);
     292    ASSERT(&handle == m_handle);
    304293    if (!m_document) {
    305294        return;
    306295    }
    307296    if (len <= 0) {
    308         handle->disconnect();
     297        handle.disconnect();
    309298        return;
    310299    }
    311300    if (!m_client) {
    312301        m_shouldDiscardReceivedData = true;
    313         handle->disconnect();
     302        handle.disconnect();
    314303        return;
    315304    }
    … …  
    326315}
    327316
    328 void WebSocketChannel::didUpdateBufferedAmount(SocketStreamHandle*, size_t bufferedAmount)
     317void WebSocketChannel::didUpdateBufferedAmount(SocketStreamHandle&, size_t bufferedAmount)
    329318{
    330319    if (m_client)
    … …  
    332321}
    333322
    334 void WebSocketChannel::didFailSocketStream(SocketStreamHandle* handle, const SocketStreamError& error)
     323void WebSocketChannel::didFailSocketStream(SocketStreamHandle& handle, const SocketStreamError& error)
    335324{
    336325    LOG(Network, "WebSocketChannel %p didFailSocketStream()", this);
    337     ASSERT(handle == m_handle || !m_handle);
     326    ASSERT(&handle == m_handle || !m_handle);
    338327    if (m_document) {
    339328        String message;
    … …  
    348337    }
    349338    m_shouldDiscardReceivedData = true;
    350     handle->disconnect();
    351 }
    352 
    353 void WebSocketChannel::didReceiveAuthenticationChallenge(SocketStreamHandle*, const AuthenticationChallenge&)
    354 {
    355 }
    356 
    357 void WebSocketChannel::didCancelAuthenticationChallenge(SocketStreamHandle*, const AuthenticationChallenge&)
    358 {
     339    handle.disconnect();
    359340}
    360341
    … …  
    398379    size_t newBufferSize = m_buffer.size() + len;
    399380    if (newBufferSize < m_buffer.size()) {
    400         LOG(Network, "WebSocketChannel %p appendToBuffer() Buffer overflow (%lu bytes already in receive buffer and appending %lu bytes)", this, static_cast<unsigned long>(m_buffer.size()), static_cast<unsigned long>(len));
     381        LOG(Network, "WebSocketChannel %p appendToBuffer() Buffer overflow (%u bytes already in receive buffer and appending %u bytes)", this, static_cast<unsigned>(m_buffer.size()), static_cast<unsigned>(len));
    401382        return false;
    402383    }
    … …  
    417398    ASSERT(m_client);
    418399    ASSERT(!m_buffer.isEmpty());
    419     LOG(Network, "WebSocketChannel %p processBuffer() Receive buffer has %lu bytes", this, static_cast<unsigned long>(m_buffer.size()));
     400    LOG(Network, "WebSocketChannel %p processBuffer() Receive buffer has %u bytes", this, static_cast<unsigned>(m_buffer.size()));
    420401
    421402    if (m_shouldDiscardReceivedData)
    … …  
    446427            skipBuffer(headerLength);
    447428            m_client->didConnect();
    448             LOG(Network, "WebSocketChannel %p %lu bytes remaining in m_buffer", this, static_cast<unsigned long>(m_buffer.size()));
     429            LOG(Network, "WebSocketChannel %p %u bytes remaining in m_buffer", this, static_cast<unsigned>(m_buffer.size()));
    449430            return !m_buffer.isEmpty();
    450431        }
    … …  
    469450            break;
    470451    if (!m_suspended && m_client && m_closed && m_handle)
    471         didCloseSocketStream(m_handle.get());
     452        didCloseSocketStream(*m_handle);
    472453}
    473454
  • trunk/Source/WebCore/Modules/websockets/WebSocketChannel.h

    r201837 r201880  
    2929 */
    3030
    31 #ifndef WebSocketChannel_h
    32 #define WebSocketChannel_h
     31#pragma once
    3332
    3433#if ENABLE(WEB_SOCKETS)
    … …  
    4039#include "WebSocketDeflateFramer.h"
    4140#include "WebSocketFrame.h"
    42 #include "WebSocketHandshake.h"
    4341#include <wtf/Deque.h>
    4442#include <wtf/Forward.h>
    … …  
    5553class SocketStreamError;
    5654class WebSocketChannelClient;
     55class WebSocketHandshake;
    5756
    5857class WebSocketChannel : public RefCounted<WebSocketChannel>, public SocketStreamHandleClient, public ThreadableWebSocketChannel, public FileReaderLoaderClient
    … …  
    7271    ThreadableWebSocketChannel::SendResult send(const JSC::ArrayBuffer&, unsigned byteOffset, unsigned byteLength) override;
    7372    ThreadableWebSocketChannel::SendResult send(Blob&) override;
    74     unsigned long bufferedAmount() const override;
     73    unsigned bufferedAmount() const override;
    7574    void close(int code, const String& reason) override; // Start closing handshake.
    7675    void fail(const String& reason) override;
    … …  
    8180
    8281    // SocketStreamHandleClient functions.
    83     void willOpenSocketStream(SocketStreamHandle*) override;
    84     void didOpenSocketStream(SocketStreamHandle*) override;
    85     void didCloseSocketStream(SocketStreamHandle*) override;
    86     void didReceiveSocketStreamData(SocketStreamHandle*, const char*, int) override;
    87     void didUpdateBufferedAmount(SocketStreamHandle*, size_t bufferedAmount) override;
    88     void didFailSocketStream(SocketStreamHandle*, const SocketStreamError&) override;
    89     void didReceiveAuthenticationChallenge(SocketStreamHandle*, const AuthenticationChallenge&) override;
    90     void didCancelAuthenticationChallenge(SocketStreamHandle*, const AuthenticationChallenge&) override;
     82    void willOpenSocketStream(SocketStreamHandle&) override;
     83    void didOpenSocketStream(SocketStreamHandle&) override;
     84    void didCloseSocketStream(SocketStreamHandle&) override;
     85    void didReceiveSocketStreamData(SocketStreamHandle&, const char*, int) override;
     86    void didUpdateBufferedAmount(SocketStreamHandle&, size_t bufferedAmount) override;
     87    void didFailSocketStream(SocketStreamHandle&, const SocketStreamError&) override;
    9188
    9289    enum CloseEventCode {
    … …  
    192189
    193190    Timer m_resumeTimer;
    194     bool m_suspended;
    195     bool m_closing;
    196     bool m_receivedClosingHandshake;
     191    bool m_suspended { false };
     192    bool m_closing { false };
     193    bool m_receivedClosingHandshake { false };
    197194    Timer m_closingTimer;
    198     bool m_closed;
    199     bool m_shouldDiscardReceivedData;
    200     unsigned long m_unhandledBufferedAmount;
    201 
    202     unsigned long m_identifier; // m_identifier == 0 means that we could not obtain a valid identifier.
     195    bool m_closed { false };
     196    bool m_shouldDiscardReceivedData { false };
     197    unsigned m_unhandledBufferedAmount { 0 };
     198
     199    unsigned m_identifier { 0 }; // m_identifier == 0 means that we could not obtain a valid identifier.
    203200
    204201    // Private members only for hybi-10 protocol.
    205     bool m_hasContinuousFrame;
     202    bool m_hasContinuousFrame { false };
    206203    WebSocketFrame::OpCode m_continuousFrameOpCode;
    207204    Vector<uint8_t> m_continuousFrameData;
    208     unsigned short m_closeEventCode;
     205    unsigned short m_closeEventCode { CloseEventCodeAbnormalClosure };
    209206    String m_closeEventReason;
    210207
    211208    Deque<std::unique_ptr<QueuedFrame>> m_outgoingFrameQueue;
    212     OutgoingFrameQueueStatus m_outgoingFrameQueueStatus;
     209    OutgoingFrameQueueStatus m_outgoingFrameQueueStatus { OutgoingFrameQueueOpen };
    213210
    214211    // FIXME: Load two or more Blobs simultaneously for better performance.
    215212    std::unique_ptr<FileReaderLoader> m_blobLoader;
    216     BlobLoaderStatus m_blobLoaderStatus;
     213    BlobLoaderStatus m_blobLoaderStatus { BlobLoaderNotStarted };
    217214
    218215    WebSocketDeflateFramer m_deflateFramer;
    … …  
    222219
    223220#endif // ENABLE(WEB_SOCKETS)
    224 
    225 #endif // WebSocketChannel_h
  • trunk/Source/WebCore/Modules/websockets/WebSocketChannelClient.h

    r198869 r201880  
    2929 */
    3030
    31 #ifndef WebSocketChannelClient_h
    32 #define WebSocketChannelClient_h
     31#pragma once
    3332
    3433#if ENABLE(WEB_SOCKETS)
    … …  
    3938namespace WebCore {
    4039
    41     class WebSocketChannelClient {
    42     public:
    43         virtual ~WebSocketChannelClient() { }
    44         virtual void didConnect() { }
    45         virtual void didReceiveMessage(const String&) { }
    46         virtual void didReceiveBinaryData(Vector<uint8_t>&&) { }
    47         virtual void didReceiveMessageError() { }
    48         virtual void didUpdateBufferedAmount(unsigned long /* bufferedAmount */) { }
    49         virtual void didStartClosingHandshake() { }
    50         enum ClosingHandshakeCompletionStatus {
    51             ClosingHandshakeIncomplete,
    52             ClosingHandshakeComplete
    53         };
    54         virtual void didClose(unsigned long /* unhandledBufferedAmount */, ClosingHandshakeCompletionStatus, unsigned short /* code */, const String& /* reason */) { }
     40class WebSocketChannelClient {
     41public:
     42    virtual ~WebSocketChannelClient() { }
     43    virtual void didConnect() { }
     44    virtual void didReceiveMessage(const String&) { }
     45    virtual void didReceiveBinaryData(Vector<uint8_t>&&) { }
     46    virtual void didReceiveMessageError() { }
     47    virtual void didUpdateBufferedAmount(unsigned /* bufferedAmount */) { }
     48    virtual void didStartClosingHandshake() { }
     49    enum ClosingHandshakeCompletionStatus {
     50        ClosingHandshakeIncomplete,
     51        ClosingHandshakeComplete
     52    };
     53    virtual void didClose(unsigned /* unhandledBufferedAmount */, ClosingHandshakeCompletionStatus, unsigned short /* code */, const String& /* reason */) { }
    5554
    56     protected:
    57         WebSocketChannelClient() { }
    58     };
     55protected:
     56    WebSocketChannelClient() { }
     57};
    5958
    6059} // namespace WebCore
    6160
    6261#endif // ENABLE(WEB_SOCKETS)
    63 
    64 #endif // WebSocketChannelClient_h
  • trunk/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp

    r201837 r201880  
    102102}
    103103
    104 unsigned long WorkerThreadableWebSocketChannel::bufferedAmount() const
     104unsigned WorkerThreadableWebSocketChannel::bufferedAmount() const
    105105{
    106106    if (!m_bridge)
    … …  
    207207        return;
    208208
    209     unsigned long bufferedAmount = m_mainWebSocketChannel->bufferedAmount();
     209    unsigned bufferedAmount = m_mainWebSocketChannel->bufferedAmount();
    210210    m_loaderProxy.postTaskForModeToWorkerGlobalScope([workerClientWrapper = m_workerClientWrapper.copyRef(), bufferedAmount](ScriptExecutionContext& context) mutable {
    211211        ASSERT_UNUSED(context, context.isWorkerGlobalScope());
    … …  
    289289}
    290290
    291 void WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount(unsigned long bufferedAmount)
     291void WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount(unsigned bufferedAmount)
    292292{
    293293    ASSERT(isMainThread());
    … …  
    309309}
    310310
    311 void WorkerThreadableWebSocketChannel::Peer::didClose(unsigned long unhandledBufferedAmount, ClosingHandshakeCompletionStatus closingHandshakeCompletion, unsigned short code, const String& reason)
     311void WorkerThreadableWebSocketChannel::Peer::didClose(unsigned unhandledBufferedAmount, ClosingHandshakeCompletionStatus closingHandshakeCompletion, unsigned short code, const String& reason)
    312312{
    313313    ASSERT(isMainThread());
    … …  
    462462}
    463463
    464 unsigned long WorkerThreadableWebSocketChannel::Bridge::bufferedAmount()
     464unsigned WorkerThreadableWebSocketChannel::Bridge::bufferedAmount()
    465465{
    466466    if (!m_peer)
  • trunk/Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.h

    r201837 r201880  
    6767    ThreadableWebSocketChannel::SendResult send(const JSC::ArrayBuffer&, unsigned byteOffset, unsigned byteLength) override;
    6868    ThreadableWebSocketChannel::SendResult send(Blob&) override;
    69     unsigned long bufferedAmount() const override;
     69    unsigned bufferedAmount() const override;
    7070    void close(int code, const String& reason) override;
    7171    void fail(const String& reason) override;
    … …  
    9797        void didReceiveMessage(const String& message) override;
    9898        void didReceiveBinaryData(Vector<uint8_t>&&) override;
    99         void didUpdateBufferedAmount(unsigned long bufferedAmount) override;
     99        void didUpdateBufferedAmount(unsigned bufferedAmount) override;
    100100        void didStartClosingHandshake() override;
    101         void didClose(unsigned long unhandledBufferedAmount, ClosingHandshakeCompletionStatus, unsigned short code, const String& reason) override;
     101        void didClose(unsigned unhandledBufferedAmount, ClosingHandshakeCompletionStatus, unsigned short code, const String& reason) override;
    102102        void didReceiveMessageError() override;
    103103
    … …  
    130130        ThreadableWebSocketChannel::SendResult send(const JSC::ArrayBuffer&, unsigned byteOffset, unsigned byteLength);
    131131        ThreadableWebSocketChannel::SendResult send(Blob&);
    132         unsigned long bufferedAmount();
     132        unsigned bufferedAmount();
    133133        void close(int code, const String& reason);
    134134        void fail(const String& reason);
  • trunk/Source/WebCore/platform/network/BlobData.cpp

    r198869 r201880  
    7676}
    7777
    78 void BlobData::appendFile(PassRefPtr<BlobDataFileReference> file)
     78void BlobData::appendFile(Ref<BlobDataFileReference>&& file)
    7979{
    8080    file->startTrackingModifications();
    81     m_items.append(BlobDataItem(file));
     81    m_items.append(BlobDataItem(WTFMove(file)));
    8282}
    8383
  • trunk/Source/WebCore/platform/network/BlobData.h

    r198869 r201880  
    6565    friend class BlobData;
    6666
    67     explicit BlobDataItem(PassRefPtr<BlobDataFileReference> file)
     67    explicit BlobDataItem(Ref<BlobDataFileReference>&& file)
    6868        : m_type(Type::File)
    69         , m_file(file)
     69        , m_file(WTFMove(file))
    7070        , m_offset(0)
    7171        , m_length(toEndOfFile)
    … …  
    112112
    113113    void appendData(const ThreadSafeDataBuffer&);
    114     void appendFile(PassRefPtr<BlobDataFileReference>);
     114    void appendFile(Ref<BlobDataFileReference>&&);
    115115
    116116private:
  • trunk/Source/WebCore/platform/network/BlobRegistry.h

    r201717 r201880  
    2929 */
    3030
    31 #ifndef BlobRegistry_h
    32 #define BlobRegistry_h
     31#pragma once
    3332
    3433#include <functional>
    … …  
    5150
    5251    // Registers a blob URL referring to the specified file.
    53     virtual void registerFileBlobURL(const URL&, RefPtr<BlobDataFileReference>&&, const String& contentType) = 0;
     52    virtual void registerFileBlobURL(const URL&, Ref<BlobDataFileReference>&&, const String& contentType) = 0;
    5453
    5554    // Registers a blob URL referring to the specified blob data.
    … …  
    7877
    7978} // namespace WebCore
    80 
    81 #endif // BlobRegistry_h
  • trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp

    r201761 r201880  
    111111}
    112112
    113 void BlobRegistryImpl::registerFileBlobURL(const URL& url, RefPtr<BlobDataFileReference>&& file, const String& contentType)
     113void BlobRegistryImpl::registerFileBlobURL(const URL& url, Ref<BlobDataFileReference>&& file, const String& contentType)
    114114{
    115115    ASSERT(isMainThread());
    116116    registerBlobResourceHandleConstructor();
    117117
    118     RefPtr<BlobData> blobData = BlobData::create(contentType);
    119 
    120     blobData->appendFile(file);
    121     m_blobs.set(url.string(), blobData.release());
     118    auto blobData = BlobData::create(contentType);
     119    blobData->appendFile(WTFMove(file));
     120    m_blobs.set(url.string(), WTFMove(blobData));
    122121}
    123122
    … …  
    172171    }
    173172
    174     if (file == nullptr || file->path().isEmpty())
     173    if (!file || file->path().isEmpty())
    175174        return;
    176175
    177     RefPtr<BlobData> backingFile = BlobData::create({ });
    178     backingFile->appendFile(WTFMove(file));
    179 
    180     m_blobs.set(url.string(), backingFile.release());
     176    auto backingFile = BlobData::create({ });
     177    backingFile->appendFile(file.releaseNonNull());
     178
     179    m_blobs.set(url.string(), WTFMove(backingFile));
    181180}
    182181
  • trunk/Source/WebCore/platform/network/BlobRegistryImpl.h

    r201761 r201880  
    5858    void appendStorageItems(BlobData*, const BlobDataItemList&, long long offset, long long length);
    5959
    60     void registerFileBlobURL(const URL&, RefPtr<BlobDataFileReference>&&, const String& contentType) override;
     60    void registerFileBlobURL(const URL&, Ref<BlobDataFileReference>&&, const String& contentType) override;
    6161    void registerBlobURL(const URL&, Vector<BlobPart>, const String& contentType) override;
    6262    void registerBlobURL(const URL&, const URL& srcURL) override;
  • trunk/Source/WebCore/platform/network/SocketStreamHandleBase.cpp

    r156550 r201880  
    6262        m_buffer.append(data, length);
    6363        if (m_client)
    64             m_client->didUpdateBufferedAmount(static_cast<SocketStreamHandle*>(this), bufferedAmount());
     64            m_client->didUpdateBufferedAmount(static_cast<SocketStreamHandle&>(*this), bufferedAmount());
    6565        return true;
    6666    }
    … …  
    7777        m_buffer.append(data + bytesWritten, length - bytesWritten);
    7878        if (m_client)
    79             m_client->didUpdateBufferedAmount(static_cast<SocketStreamHandle*>(this), bufferedAmount());
     79            m_client->didUpdateBufferedAmount(static_cast<SocketStreamHandle&>(*this), bufferedAmount());
    8080    }
    8181    return true;
    … …  
    9494void SocketStreamHandleBase::disconnect()
    9595{
    96     Ref<SocketStreamHandle> protect(*static_cast<SocketStreamHandle*>(this)); // platformClose calls the client, which may make the handle get deallocated immediately.
     96    Ref<SocketStreamHandle> protect(static_cast<SocketStreamHandle&>(*this)); // platformClose calls the client, which may make the handle get deallocated immediately.
    9797
    9898    platformClose();
    … …  
    128128    } while (!pending && !m_buffer.isEmpty());
    129129    if (m_client)
    130         m_client->didUpdateBufferedAmount(static_cast<SocketStreamHandle*>(this), bufferedAmount());
     130        m_client->didUpdateBufferedAmount(static_cast<SocketStreamHandle&>(*this), bufferedAmount());
    131131    return true;
    132132}
  • trunk/Source/WebCore/platform/network/SocketStreamHandleBase.h

    r156550 r201880  
    3030 */
    3131
    32 #ifndef SocketStreamHandleBase_h
    33 #define SocketStreamHandleBase_h
     32#pragma once
    3433
    3534#include "URL.h"
    36 
    3735#include <wtf/StreamBuffer.h>
    3836
    … …  
    7068
    7169}  // namespace WebCore
    72 
    73 #endif  // SocketStreamHandleBase_h
  • trunk/Source/WebCore/platform/network/SocketStreamHandleClient.h

    r156550 r201880  
    3030 */
    3131
    32 #ifndef SocketStreamHandleClient_h
    33 #define SocketStreamHandleClient_h
     32#pragma once
    3433
    3534namespace WebCore {
    3635
    37     class AuthenticationChallenge;
    38     class URL;
    39     class SocketStreamError;
    40     class SocketStreamHandle;
     36class SocketStreamError;
     37class SocketStreamHandle;
    4138
    42     class SocketStreamHandleClient {
    43     public:
    44         virtual ~SocketStreamHandleClient() { }
     39class SocketStreamHandleClient {
     40public:
     41    virtual ~SocketStreamHandleClient() { }
    4542
    46         virtual void willOpenSocketStream(SocketStreamHandle*) { }
    47         virtual void didOpenSocketStream(SocketStreamHandle*) { }
    48         virtual void didCloseSocketStream(SocketStreamHandle*) { }
    49         virtual void didReceiveSocketStreamData(SocketStreamHandle*, const char* /*data*/, int /*length*/) { }
    50         virtual void didUpdateBufferedAmount(SocketStreamHandle*, size_t /*bufferedAmount*/) { }
     43    virtual void willOpenSocketStream(SocketStreamHandle&) { }
     44    virtual void didOpenSocketStream(SocketStreamHandle&) { }
     45    virtual void didCloseSocketStream(SocketStreamHandle&) { }
     46    virtual void didReceiveSocketStreamData(SocketStreamHandle&, const char* /*data*/, int /*length*/) { }
     47    virtual void didUpdateBufferedAmount(SocketStreamHandle&, size_t /*bufferedAmount*/) { }
    5148
    52         virtual void didFailSocketStream(SocketStreamHandle*, const SocketStreamError&) { }
     49    virtual void didFailSocketStream(SocketStreamHandle&, const SocketStreamError&) { }
     50};
    5351
    54         // No authentication for streams per se, but proxy may ask for credentials.
    55         virtual void didReceiveAuthenticationChallenge(SocketStreamHandle*, const AuthenticationChallenge&) { }
    56         virtual void didCancelAuthenticationChallenge(SocketStreamHandle*, const AuthenticationChallenge&) { }
    57     };
    58 
    59 }  // namespace WebCore
    60 
    61 #endif  // SocketStreamHandleClient_h
     52} // namespace WebCore
  • trunk/Source/WebCore/platform/network/cf/SocketStreamHandle.h

    r199039 r201880  
    3030 */
    3131
    32 #ifndef SocketStreamHandle_h
    33 #define SocketStreamHandle_h
     32#pragma once
    3433
    35 #include "AuthenticationClient.h"
    3634#include "SocketStreamHandleBase.h"
    3735#include <wtf/RetainPtr.h>
    … …  
    4846class SocketStreamHandleClient;
    4947
    50 class SocketStreamHandle : public ThreadSafeRefCounted<SocketStreamHandle>, public SocketStreamHandleBase, public AuthenticationClient {
     48class SocketStreamHandle : public ThreadSafeRefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
    5149public:
    52     static PassRefPtr<SocketStreamHandle> create(const URL& url, SocketStreamHandleClient* client, NetworkingContext& networkingContext, bool usesEphemeralSession) { return adoptRef(new SocketStreamHandle(url, client, networkingContext, usesEphemeralSession)); }
     50    static Ref<SocketStreamHandle> create(const URL& url, SocketStreamHandleClient* client, NetworkingContext& networkingContext, bool usesEphemeralSession) { return adoptRef(*new SocketStreamHandle(url, client, networkingContext, usesEphemeralSession)); }
    5351
    5452    virtual ~SocketStreamHandle();
    55 
    56     using ThreadSafeRefCounted<SocketStreamHandle>::ref;
    57     using ThreadSafeRefCounted<SocketStreamHandle>::deref;
    5853
    5954private:
    … …  
    8984    bool getStoredCONNECTProxyCredentials(const ProtectionSpace&, String& login, String& password);
    9085
    91     // No authentication for streams per se, but proxy may ask for credentials.
    92     virtual void receivedCredential(const AuthenticationChallenge&, const Credential&);
    93     virtual void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&);
    94     virtual void receivedCancellation(const AuthenticationChallenge&);
    95     virtual void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&);
    96     virtual void receivedChallengeRejection(const AuthenticationChallenge&);
    97 
    98     virtual void refAuthenticationClient() { ref(); }
    99     virtual void derefAuthenticationClient() { deref(); }
    100 
    10186    enum ConnectingSubstate { New, ExecutingPACFile, WaitingForCredentials, WaitingForConnect, Connected };
    10287    ConnectingSubstate m_connectingSubstate;
    … …  
    118103
    119104}  // namespace WebCore
    120 
    121 #endif  // SocketStreamHandle_h
  • trunk/Source/WebCore/platform/network/cf/SocketStreamHandleCFNet.cpp

    r201500 r201880  
    8888        && !usesEphemeralSession
    8989        && _CFNetworkIsKnownHSTSHostWithSession(m_httpsURL.get(), nullptr)) {
    90         m_client->didFailSocketStream(this, SocketStreamError(0, m_url.string(), "WebSocket connection failed because it violates HTTP Strict Transport Security."));
     90        m_client->didFailSocketStream(*this, SocketStreamError(0, m_url.string(), "WebSocket connection failed because it violates HTTP Strict Transport Security."));
    9191        return;
    9292    }
    … …  
    389389    if (!CFHTTPAuthenticationRequiresUserNameAndPassword(authentication.get())) {
    390390        // That's all we can offer...
    391         m_client->didFailSocketStream(this, SocketStreamError(0, m_url.string(), "Proxy authentication scheme is not supported for WebSockets"));
     391        m_client->didFailSocketStream(*this, SocketStreamError(0, m_url.string(), "Proxy authentication scheme is not supported for WebSockets"));
    392392        return;
    393393    }
    … …  
    400400    if (!methodCF || !realmCF) {
    401401        // This shouldn't happen, but on some OS versions we get incomplete authentication data, see <rdar://problem/10416316>.
    402         m_client->didFailSocketStream(this, SocketStreamError(0, m_url.string(), "WebSocket proxy authentication couldn't be handled"));
     402        m_client->didFailSocketStream(*this, SocketStreamError(0, m_url.string(), "WebSocket proxy authentication couldn't be handled"));
    403403        return;
    404404    }
    … …  
    419419        if (!proxyAuthorizationString) {
    420420            // Fails e.g. for NTLM auth.
    421             m_client->didFailSocketStream(this, SocketStreamError(0, m_url.string(), "Proxy authentication scheme is not supported for WebSockets"));
     421            m_client->didFailSocketStream(*this, SocketStreamError(0, m_url.string(), "Proxy authentication scheme is not supported for WebSockets"));
    422422            return;
    423423        }
    … …  
    431431    // FIXME: On platforms where AuthBrokerAgent is not available, ask the client if credentials could not be found.
    432432
    433     m_client->didFailSocketStream(this, SocketStreamError(0, m_url.string(), "Proxy credentials are not available"));
     433    m_client->didFailSocketStream(*this, SocketStreamError(0, m_url.string(), "Proxy credentials are not available"));
    434434}
    435435
    … …  
    506506                    return;
    507507                default:
    508                     m_client->didFailSocketStream(this, SocketStreamError(static_cast<int>(proxyResponseCode), m_url.string(), "Proxy connection could not be established, unexpected response code"));
     508                    m_client->didFailSocketStream(*this, SocketStreamError(static_cast<int>(proxyResponseCode), m_url.string(), "Proxy connection could not be established, unexpected response code"));
    509509                    platformClose();
    510510                    return;
    … …  
    513513            m_connectingSubstate = Connected;
    514514            m_state = Open;
    515             m_client->didOpenSocketStream(this);
     515            m_client->didOpenSocketStream(*this);
    516516        }
    517517
    … …  
    534534            return;
    535535
    536         m_client->didReceiveSocketStreamData(this, reinterpret_cast<const char*>(ptr), length);
     536        m_client->didReceiveSocketStreamData(*this, reinterpret_cast<const char*>(ptr), length);
    537537
    538538        return;
    … …  
    584584            m_connectingSubstate = Connected;
    585585            m_state = Open;
    586             m_client->didOpenSocketStream(this);
     586            m_client->didOpenSocketStream(*this);
    587587        }
    588588
    … …  
    637637    }
    638638
    639     m_client->didFailSocketStream(this, SocketStreamError(static_cast<int>(errorCode), m_url.string(), description));
     639    m_client->didFailSocketStream(*this, SocketStreamError(static_cast<int>(errorCode), m_url.string(), description));
    640640}
    641641
    … …  
    665665    if (!m_readStream) {
    666666        if (m_connectingSubstate == New || m_connectingSubstate == ExecutingPACFile)
    667             m_client->didCloseSocketStream(this);
     667            m_client->didCloseSocketStream(*this);
    668668        return;
    669669    }
    … …  
    683683    m_writeStream = 0;
    684684
    685     m_client->didCloseSocketStream(this);
    686 }
    687 
    688 void SocketStreamHandle::receivedCredential(const AuthenticationChallenge&, const Credential&)
    689 {
    690 }
    691 
    692 void SocketStreamHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&)
    693 {
    694 }
    695 
    696 void SocketStreamHandle::receivedCancellation(const AuthenticationChallenge&)
    697 {
    698 }
    699 
    700 void SocketStreamHandle::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&)
    701 {
    702 }
    703 
    704 void SocketStreamHandle::receivedChallengeRejection(const AuthenticationChallenge&)
    705 {
     685    m_client->didCloseSocketStream(*this);
    706686}
    707687
  • trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp

    r196223 r201880  
    4141#include "SSLHandle.h"
    4242
    43 #if PLATFORM(WIN) && USE(CF)
    44 #include <wtf/PassRefPtr.h>
    45 #include <wtf/RetainPtr.h>
    46 #endif
    47 
    4843namespace WebCore {
    4944
  • trunk/Source/WebCore/platform/network/curl/SocketStreamHandle.h

    r199053 r201880  
    3030 */
    3131
    32 #ifndef SocketStreamHandle_h
    33 #define SocketStreamHandle_h
     32#pragma once
    3433
    3534#include "SocketStreamHandleBase.h"
    … …  
    4847namespace WebCore {
    4948
    50 class AuthenticationChallenge;
    51 class Credential;
    5249class NetworkingContext;
    5350class SocketStreamHandleClient;
    … …  
    7673
    7774    static std::unique_ptr<char[]> createCopy(const char* data, int length);
    78 
    79     // No authentication for streams per se, but proxy may ask for credentials.
    80     void didReceiveAuthenticationChallenge(const AuthenticationChallenge&);
    81     void receivedCredential(const AuthenticationChallenge&, const Credential&);
    82     void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&);
    83     void receivedCancellation(const AuthenticationChallenge&);
    84     void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&);
    85     void receivedChallengeRejection(const AuthenticationChallenge&);
    8675
    8776    struct SocketData {
    … …  
    112101
    113102} // namespace WebCore
    114 
    115 #endif // SocketStreamHandle_h
  • trunk/Source/WebCore/platform/network/curl/SocketStreamHandleCurl.cpp

    r200687 r201880  
    3636
    3737#include "Logging.h"
    38 #include "NotImplemented.h"
    3938#include "SocketStreamHandleClient.h"
    4039#include "URL.h"
    … …  
    8382
    8483    if (m_client)
    85         m_client->didCloseSocketStream(this);
     84        m_client->didCloseSocketStream(*this);
    8685}
    8786
    … …  
    259258        if (socketData.size > 0) {
    260259            if (m_client && state() == Open)
    261                 m_client->didReceiveSocketStreamData(this, socketData.data.get(), socketData.size);
     260                m_client->didReceiveSocketStreamData(*this, socketData.data.get(), socketData.size);
    262261        } else
    263262            platformClose();
    … …  
    272271
    273272    if (m_client)
    274         m_client->didOpenSocketStream(this);
     273        m_client->didOpenSocketStream(*this);
    275274}
    276275
    … …  
    283282}
    284283
    285 void SocketStreamHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge&)
    286 {
    287     notImplemented();
    288 }
    289 
    290 void SocketStreamHandle::receivedCredential(const AuthenticationChallenge&, const Credential&)
    291 {
    292     notImplemented();
    293 }
    294 
    295 void SocketStreamHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&)
    296 {
    297     notImplemented();
    298 }
    299 
    300 void SocketStreamHandle::receivedCancellation(const AuthenticationChallenge&)
    301 {
    302     notImplemented();
    303 }
    304 
    305 void SocketStreamHandle::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&)
    306 {
    307     notImplemented();
    308 }
    309 
    310 void SocketStreamHandle::receivedChallengeRejection(const AuthenticationChallenge&)
    311 {
    312     notImplemented();
    313 }
    314 
    315284} // namespace WebCore
    316285
  • trunk/Source/WebCore/platform/network/soup/SocketStreamHandle.h

    r199053 r201880  
    4444namespace WebCore {
    4545
    46     class AuthenticationChallenge;
    47     class Credential;
    4846    class NetworkingContext;
    4947    class SocketStreamHandleClient;
    … …  
    5149    class SocketStreamHandle : public RefCounted<SocketStreamHandle>, public SocketStreamHandleBase {
    5250    public:
    53         static PassRefPtr<SocketStreamHandle> create(const URL& url, SocketStreamHandleClient* client, NetworkingContext&, bool) { return adoptRef(new SocketStreamHandle(url, client)); }
    54         static PassRefPtr<SocketStreamHandle> create(GSocketConnection* socketConnection, SocketStreamHandleClient* client) { return adoptRef(new SocketStreamHandle(socketConnection, client)); }
     51        static Ref<SocketStreamHandle> create(const URL& url, SocketStreamHandleClient* client, NetworkingContext&, bool) { return adoptRef(*new SocketStreamHandle(url, client)); }
     52        static Ref<SocketStreamHandle> create(GSocketConnection* socketConnection, SocketStreamHandleClient* client) { return adoptRef(*new SocketStreamHandle(socketConnection, client)); }
    5553
    5654        virtual ~SocketStreamHandle();
    … …  
    7573        SocketStreamHandle(GSocketConnection*, SocketStreamHandleClient*);
    7674
    77         // No authentication for streams per se, but proxy may ask for credentials.
    78         void didReceiveAuthenticationChallenge(const AuthenticationChallenge&);
    79         void receivedCredential(const AuthenticationChallenge&, const Credential&);
    80         void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&);
    81         void receivedCancellation(const AuthenticationChallenge&);
    82         void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&);
    83         void receivedChallengeRejection(const AuthenticationChallenge&);
    84 
    8575        void beginWaitingForSocketWritability();
    8676        void stopWaitingForSocketWritability();
  • trunk/Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp

    r200895 r201880  
    3737#include "URL.h"
    3838#include "Logging.h"
    39 #include "NotImplemented.h"
    4039#include "SocketStreamError.h"
    4140#include "SocketStreamHandleClient.h"
    … …  
    6968}
    7069
    71 static void deactivateHandle(SocketStreamHandle* handle)
    72 {
    73     gActiveHandles.remove(handle->id());
    74 }
    75 
    76 static void* activateHandle(SocketStreamHandle* handle)
     70static void deactivateHandle(SocketStreamHandle& handle)
     71{
     72    gActiveHandles.remove(handle.id());
     73}
     74
     75static void* activateHandle(SocketStreamHandle& handle)
    7776{
    7877    // The first id cannot be 0, because it conflicts with the HashMap emptyValue.
    7978    static gint currentHandleId = 1;
    8079    void* id = GINT_TO_POINTER(currentHandleId++);
    81     gActiveHandles.set(id, handle);
     80    gActiveHandles.set(id, &handle);
    8281    return id;
    8382}
    … …  
    8988    unsigned int port = url.hasPort() ? url.port() : (url.protocolIs("wss") ? 443 : 80);
    9089
    91     m_id = activateHandle(this);
     90    m_id = activateHandle(*this);
    9291    GRefPtr<GSocketClient> socketClient = adoptGRef(g_socket_client_new());
    9392    if (url.protocolIs("wss"))
    … …  
    101100{
    102101    LOG(Network, "SocketStreamHandle %p new client %p", this, m_client);
    103     m_id = activateHandle(this);
     102    m_id = activateHandle(*this);
    104103    connected(socketConnection, 0);
    105104}
    … …  
    109108    LOG(Network, "SocketStreamHandle %p delete", this);
    110109    // If for some reason we were destroyed without closing, ensure that we are deactivated.
    111     deactivateHandle(this);
    112     setClient(0);
     110    deactivateHandle(*this);
     111    setClient(nullptr);
    113112}
    114113
    … …  
    116115{
    117116    if (error) {
    118         m_client->didFailSocketStream(this, SocketStreamError(error->code, error->message));
     117        m_client->didFailSocketStream(*this, SocketStreamError(error->code, error->message));
    119118        return;
    120119    }
    … …  
    129128
    130129    m_state = Open;
    131     m_client->didOpenSocketStream(this);
     130    m_client->didOpenSocketStream(*this);
    132131}
    133132
    … …  
    135134{
    136135    if (error) {
    137         m_client->didFailSocketStream(this, SocketStreamError(error->code, error->message));
     136        m_client->didFailSocketStream(*this, SocketStreamError(error->code, error->message));
    138137        return;
    139138    }
    … …  
    145144
    146145    // The client can close the handle, potentially removing the last reference.
    147     RefPtr<SocketStreamHandle> protectedThis(this);
    148     m_client->didReceiveSocketStreamData(this, m_readBuffer.get(), bytesRead);
     146    Ref<SocketStreamHandle> protectedThis(*this);
     147    m_client->didReceiveSocketStreamData(*this, m_readBuffer.get(), bytesRead);
    149148    if (m_inputStream) // The client may have closed the connection.
    150149        g_input_stream_read_async(m_inputStream.get(), m_readBuffer.get(), READ_BUFFER_SIZE, G_PRIORITY_DEFAULT, 0,
    … …  
    175174            beginWaitingForSocketWritability();
    176175        else
    177             m_client->didFailSocketStream(this, SocketStreamError(error->code, error->message));
     176            m_client->didFailSocketStream(*this, SocketStreamError(error->code, error->message));
    178177        return 0;
    179178    }
    … …  
    191190    LOG(Network, "SocketStreamHandle %p platformClose", this);
    192191    // We remove this handle from the active handles list first, to disable all callbacks.
    193     deactivateHandle(this);
     192    deactivateHandle(*this);
    194193    stopWaitingForSocketWritability();
    195194
    … …  
    198197        g_io_stream_close(G_IO_STREAM(m_socketConnection.get()), 0, &error.outPtr());
    199198        if (error)
    200             m_client->didFailSocketStream(this, SocketStreamError(error->code, error->message));
     199            m_client->didFailSocketStream(*this, SocketStreamError(error->code, error->message));
    201200        m_socketConnection = 0;
    202201    }
    … …  
    206205    m_readBuffer = nullptr;
    207206
    208     m_client->didCloseSocketStream(this);
    209 }
    210 
    211 void SocketStreamHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge&)
    212 {
    213     notImplemented();
    214 }
    215 
    216 void SocketStreamHandle::receivedCredential(const AuthenticationChallenge&, const Credential&)
    217 {
    218     notImplemented();
    219 }
    220 
    221 void SocketStreamHandle::receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&)
    222 {
    223     notImplemented();
    224 }
    225 
    226 void SocketStreamHandle::receivedCancellation(const AuthenticationChallenge&)
    227 {
    228     notImplemented();
    229 }
    230 
    231 void SocketStreamHandle::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&)
    232 {
    233     notImplemented();
    234 }
    235 
    236 void SocketStreamHandle::receivedChallengeRejection(const AuthenticationChallenge&)
    237 {
    238     notImplemented();
     207    m_client->didCloseSocketStream(*this);
    239208}
    240209
  • trunk/Source/WebKit2/ChangeLog

    r201869 r201880  
     12016-06-09  Alex Christensen  <achristensen@webkit.org>
     2
     3        Clean up WebSocket code
     4        https://bugs.webkit.org/show_bug.cgi?id=158551
     5
     6        Reviewed by Darin Adler.
     7
     8        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
     9        (WebKit::BlobRegistryProxy::registerFileBlobURL):
     10        * WebProcess/FileAPI/BlobRegistryProxy.h:
     11
    1122016-06-09  David Kilzer  <ddkilzer@apple.com>
    213
  • trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp

    r201717 r201880  
    3737namespace WebKit {
    3838
    39 void BlobRegistryProxy::registerFileBlobURL(const WebCore::URL& url, RefPtr<BlobDataFileReference>&& file, const String& contentType)
     39void BlobRegistryProxy::registerFileBlobURL(const WebCore::URL& url, Ref<BlobDataFileReference>&& file, const String& contentType)
    4040{
    4141    SandboxExtension::Handle extensionHandle;
  • trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.h

    r201717 r201880  
    3333class BlobRegistryProxy final : public WebCore::BlobRegistry {
    3434public:
    35     void registerFileBlobURL(const WebCore::URL&, RefPtr<WebCore::BlobDataFileReference>&&, const String& contentType) override;
     35    void registerFileBlobURL(const WebCore::URL&, Ref<WebCore::BlobDataFileReference>&&, const String& contentType) override;
    3636    void registerBlobURL(const WebCore::URL&, Vector<WebCore::BlobPart>, const String& contentType) override;
    3737    void registerBlobURL(const WebCore::URL&, const WebCore::URL& srcURL) override;
Note: See TracChangeset for help on using the changeset viewer.