Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: Source/modules/websockets/MainThreadWebSocketChannel.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/webmidi/NavigatorWebMIDI.cpp ('k') | Source/modules/websockets/WebSocket.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 m_state = ChannelClosed; 284 m_state = ChannelClosed;
285 if (m_closingTimer.isActive()) 285 if (m_closingTimer.isActive())
286 m_closingTimer.stop(); 286 m_closingTimer.stop();
287 if (m_outgoingFrameQueueStatus != OutgoingFrameQueueClosed) 287 if (m_outgoingFrameQueueStatus != OutgoingFrameQueueClosed)
288 abortOutgoingFrameQueue(); 288 abortOutgoingFrameQueue();
289 if (m_handle) { 289 if (m_handle) {
290 m_unhandledBufferedAmount = m_handle->bufferedAmount(); 290 m_unhandledBufferedAmount = m_handle->bufferedAmount();
291 WebSocketChannelClient* client = m_client; 291 WebSocketChannelClient* client = m_client;
292 m_client = 0; 292 m_client = 0;
293 clearDocument(); 293 clearDocument();
294 m_handle = 0; 294 m_handle = nullptr;
295 if (client) 295 if (client)
296 client->didClose(m_unhandledBufferedAmount, m_receivedClosingHandsha ke ? WebSocketChannelClient::ClosingHandshakeComplete : WebSocketChannelClient:: ClosingHandshakeIncomplete, m_closeEventCode, m_closeEventReason); 296 client->didClose(m_unhandledBufferedAmount, m_receivedClosingHandsha ke ? WebSocketChannelClient::ClosingHandshakeComplete : WebSocketChannelClient:: ClosingHandshakeIncomplete, m_closeEventCode, m_closeEventReason);
297 } 297 }
298 deref(); 298 deref();
299 } 299 }
300 300
301 void MainThreadWebSocketChannel::didReceiveSocketStreamData(SocketStreamHandle* handle, const char* data, int len) 301 void MainThreadWebSocketChannel::didReceiveSocketStreamData(SocketStreamHandle* handle, const char* data, int len)
302 { 302 {
303 WTF_LOG(Network, "MainThreadWebSocketChannel %p didReceiveSocketStreamData() Received %d bytes", this, len); 303 WTF_LOG(Network, "MainThreadWebSocketChannel %p didReceiveSocketStreamData() Received %d bytes", this, len);
304 RefPtr<MainThreadWebSocketChannel> protect(this); // The client can close th e channel, potentially removing the last reference. 304 RefPtr<MainThreadWebSocketChannel> protect(this); // The client can close th e channel, potentially removing the last reference.
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 } 822 }
823 823
824 Vector<char> frameData; 824 Vector<char> frameData;
825 frame.makeFrameData(frameData); 825 frame.makeFrameData(frameData);
826 826
827 m_perMessageDeflate.resetDeflateBuffer(); 827 m_perMessageDeflate.resetDeflateBuffer();
828 return m_handle->send(frameData.data(), frameData.size()); 828 return m_handle->send(frameData.data(), frameData.size());
829 } 829 }
830 830
831 } // namespace WebCore 831 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/webmidi/NavigatorWebMIDI.cpp ('k') | Source/modules/websockets/WebSocket.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698