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

Side by Side Diff: Source/modules/websockets/WorkerThreadableWebSocketChannel.h

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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void close(int code, const String& reason); 111 void close(int code, const String& reason);
112 void fail(const String& reason, MessageLevel, const String& sourceURL, u nsigned lineNumber); 112 void fail(const String& reason, MessageLevel, const String& sourceURL, u nsigned lineNumber);
113 void disconnect(); 113 void disconnect();
114 void suspend(); 114 void suspend();
115 void resume(); 115 void resume();
116 116
117 // WebSocketChannelClient functions. 117 // WebSocketChannelClient functions.
118 virtual void didConnect() OVERRIDE; 118 virtual void didConnect() OVERRIDE;
119 virtual void didReceiveMessage(const String& message) OVERRIDE; 119 virtual void didReceiveMessage(const String& message) OVERRIDE;
120 virtual void didReceiveBinaryData(PassOwnPtr<Vector<char> >) OVERRIDE; 120 virtual void didReceiveBinaryData(PassOwnPtr<Vector<char> >) OVERRIDE;
121 virtual void didUpdateBufferedAmount(unsigned long bufferedAmount) OVERR IDE; 121 virtual void didIncreaseBufferedAmount(unsigned long) OVERRIDE;
122 virtual void didDecreaseBufferedAmount(unsigned long) OVERRIDE;
122 virtual void didStartClosingHandshake() OVERRIDE; 123 virtual void didStartClosingHandshake() OVERRIDE;
123 virtual void didClose(unsigned long unhandledBufferedAmount, ClosingHand shakeCompletionStatus, unsigned short code, const String& reason) OVERRIDE; 124 virtual void didClose(unsigned long unhandledBufferedAmount, ClosingHand shakeCompletionStatus, unsigned short code, const String& reason) OVERRIDE;
124 virtual void didReceiveMessageError() OVERRIDE; 125 virtual void didReceiveMessageError() OVERRIDE;
125 126
126 private: 127 private:
127 Peer(PassRefPtr<WeakReference<Peer> >, PassRefPtr<ThreadableWebSocketCha nnelClientWrapper>, WorkerLoaderProxy&, ExecutionContext*, const String& sourceU RL, unsigned lineNumber, PassOwnPtr<ThreadableWebSocketChannelSyncHelper>); 128 Peer(PassRefPtr<WeakReference<Peer> >, PassRefPtr<ThreadableWebSocketCha nnelClientWrapper>, WorkerLoaderProxy&, ExecutionContext*, const String& sourceU RL, unsigned lineNumber, PassOwnPtr<ThreadableWebSocketChannelSyncHelper>);
128 129
129 const RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrap per; 130 const RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrap per;
130 WorkerLoaderProxy& m_loaderProxy; 131 WorkerLoaderProxy& m_loaderProxy;
131 RefPtrWillBePersistent<WebSocketChannel> m_mainWebSocketChannel; 132 RefPtrWillBePersistent<WebSocketChannel> m_mainWebSocketChannel;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 183
183 const RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper; 184 const RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper;
184 RefPtr<Bridge> m_bridge; 185 RefPtr<Bridge> m_bridge;
185 String m_sourceURLAtConnection; 186 String m_sourceURLAtConnection;
186 unsigned m_lineNumberAtConnection; 187 unsigned m_lineNumberAtConnection;
187 }; 188 };
188 189
189 } // namespace WebCore 190 } // namespace WebCore
190 191
191 #endif // WorkerThreadableWebSocketChannel_h 192 #endif // WorkerThreadableWebSocketChannel_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698