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

Unified Diff: Source/web/WebSocketImpl.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 side-by-side diff with in-line comments
Download patch
Index: Source/web/WebSocketImpl.h
diff --git a/Source/web/WebSocketImpl.h b/Source/web/WebSocketImpl.h
index 73180bfd2effd8cfbae214351cdadc3236f76ba4..3853696c604876a9ab1476aded6d34f6812d85ce 100644
--- a/Source/web/WebSocketImpl.h
+++ b/Source/web/WebSocketImpl.h
@@ -71,9 +71,9 @@ public:
virtual void didReceiveMessage(const String& message) OVERRIDE;
virtual void didReceiveBinaryData(PassOwnPtr<Vector<char> > binaryData) OVERRIDE;
virtual void didReceiveMessageError() OVERRIDE;
- virtual void didUpdateBufferedAmount(unsigned long bufferedAmount) OVERRIDE;
+ virtual void didConsumeBufferedAmount(unsigned long consumed) OVERRIDE;
virtual void didStartClosingHandshake() OVERRIDE;
- virtual void didClose(unsigned long bufferedAmount, ClosingHandshakeCompletionStatus, unsigned short code, const String& reason) OVERRIDE;
+ virtual void didClose(ClosingHandshakeCompletionStatus, unsigned short code, const String& reason) OVERRIDE;
private:
RefPtrWillBePersistent<WebCore::WebSocketChannel> m_private;
@@ -81,6 +81,10 @@ private:
BinaryType m_binaryType;
WebString m_subprotocol;
WebString m_extensions;
+ bool m_isClosingOrClosed;
+ // m_bufferedAmount includes m_bufferedAmountAfterClose.
+ unsigned long m_bufferedAmount;
+ unsigned long m_bufferedAmountAfterClose;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698