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

Unified Diff: extensions/browser/api/cast_channel/cast_socket.h

Issue 2707543002: [Cast Channel] Fix "leaky" CastChannelOpenFunction. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/cast_channel/cast_socket.h
diff --git a/extensions/browser/api/cast_channel/cast_socket.h b/extensions/browser/api/cast_channel/cast_socket.h
index 08a69b4bf8108467bb7c727ebfd6382f12906ed8..78a7bb0d5d8fa791e98b352b45acaa448e180341 100644
--- a/extensions/browser/api/cast_channel/cast_socket.h
+++ b/extensions/browser/api/cast_channel/cast_socket.h
@@ -70,6 +70,9 @@ class CastSocket : public ApiResource {
// Instead use Close().
// |callback| will be invoked with any ChannelError that occurred, or
// CHANNEL_ERROR_NONE if successful.
+ // If the CastSocket is destroyed while the connection is pending, |callback|
+ // will be invoked with CHANNEL_ERROR_UNKNOWN. In this case, invoking
+ // |callback| must not result in any re-entrancy behavior.
// |delegate| receives message receipt and error events.
// Ownership of |delegate| is transferred to this CastSocket.
virtual void Connect(std::unique_ptr<CastTransport::Delegate> delegate,
« no previous file with comments | « extensions/browser/api/cast_channel/cast_channel_api.cc ('k') | extensions/browser/api/cast_channel/cast_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698