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

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

Issue 311993006: [WebSocket] bufferedAmount should not decrease inside a task. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 if (m_client) 59 if (m_client)
60 m_client->didReceiveMessage(message); 60 m_client->didReceiveMessage(message);
61 } 61 }
62 62
63 void ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData(PassOwnPtr<Ve ctor<char> > binaryData) 63 void ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData(PassOwnPtr<Ve ctor<char> > binaryData)
64 { 64 {
65 if (m_client) 65 if (m_client)
66 m_client->didReceiveBinaryData(binaryData); 66 m_client->didReceiveBinaryData(binaryData);
67 } 67 }
68 68
69 void ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount(unsigned l ong bufferedAmount) 69 void ThreadableWebSocketChannelClientWrapper::didConsumeBufferedAmount(unsigned long consumed)
70 { 70 {
71 if (m_client) 71 if (m_client)
72 m_client->didUpdateBufferedAmount(bufferedAmount); 72 m_client->didConsumeBufferedAmount(consumed);
73 } 73 }
74 74
75 void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake() 75 void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake()
76 { 76 {
77 if (m_client) 77 if (m_client)
78 m_client->didStartClosingHandshake(); 78 m_client->didStartClosingHandshake();
79 } 79 }
80 80
81 void ThreadableWebSocketChannelClientWrapper::didClose(unsigned long unhandledBu fferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHa ndshakeCompletion, unsigned short code, const String& reason) 81 void ThreadableWebSocketChannelClientWrapper::didClose(WebSocketChannelClient::C losingHandshakeCompletionStatus closingHandshakeCompletion, unsigned short code, const String& reason)
82 { 82 {
83 if (m_client) 83 if (m_client)
84 m_client->didClose(unhandledBufferedAmount, closingHandshakeCompletion, code, reason); 84 m_client->didClose(closingHandshakeCompletion, code, reason);
85 } 85 }
86 86
87 void ThreadableWebSocketChannelClientWrapper::didReceiveMessageError() 87 void ThreadableWebSocketChannelClientWrapper::didReceiveMessageError()
88 { 88 {
89 if (m_client) 89 if (m_client)
90 m_client->didReceiveMessageError(); 90 m_client->didReceiveMessageError();
91 } 91 }
92 92
93 } // namespace WebCore 93 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698