From 0ae5df51bcef58b957cd30f6a3b19a5376c07417 Mon Sep 17 00:00:00 2001 From: Jason Duell Date: Fri, 29 Jun 2012 22:59:49 -0700 Subject: [PATCH] Bug 769529 - Update nsIWebSocket*.idl comments to reflect that we don't always call OnStart. r=mcmanus, sr=biesi --- netwerk/protocol/websocket/nsIWebSocketChannel.idl | 3 +-- netwerk/protocol/websocket/nsIWebSocketListener.idl | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/netwerk/protocol/websocket/nsIWebSocketChannel.idl b/netwerk/protocol/websocket/nsIWebSocketChannel.idl index 80a8590957e4..3697bea206e1 100644 --- a/netwerk/protocol/websocket/nsIWebSocketChannel.idl +++ b/netwerk/protocol/websocket/nsIWebSocketChannel.idl @@ -62,8 +62,7 @@ interface nsIWebSocketChannel : nsISupports * to the socket listener as they arrive. The socket listener's methods * are called on the thread that calls asyncOpen and are not called until * after asyncOpen returns. If asyncOpen returns successfully, the - * protocol implementation promises to call at least onStart and onStop of - * the listener. + * protocol implementation promises to call at least onStop on the listener. * * NOTE: Implementations should throw NS_ERROR_ALREADY_OPENED if the * websocket connection is reopened. diff --git a/netwerk/protocol/websocket/nsIWebSocketListener.idl b/netwerk/protocol/websocket/nsIWebSocketListener.idl index df98b12e1c4e..72dec1bb6ba4 100644 --- a/netwerk/protocol/websocket/nsIWebSocketListener.idl +++ b/netwerk/protocol/websocket/nsIWebSocketListener.idl @@ -15,7 +15,12 @@ interface nsIWebSocketListener : nsISupports { /** * Called to signify the establishment of the message stream. - * Any listener that receives onStart will also receive OnStop. + * + * Unlike most other networking channels (which use nsIRequestObserver + * instead of this class), we do not guarantee that OnStart is always + * called: OnStop is called without calling this function if errors occur + * during connection setup. If the websocket connection is successful, + * OnStart will be called before any other calls to this API. * * @param aContext user defined context */