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

Unified Diff: webkit/plugins/ppapi/ppb_websocket_impl.cc

Issue 10169036: WebSocket Pepper API: the second Close() should not return error code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix grammar nits Created 8 years, 8 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
« no previous file with comments | « ppapi/tests/test_websocket.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_websocket_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_websocket_impl.cc b/webkit/plugins/ppapi/ppb_websocket_impl.cc
index 5851be38556286aee9554db8aa60fc7b9fb14bc7..154fe99800c86f762e03fa079b820798710aa79c 100644
--- a/webkit/plugins/ppapi/ppb_websocket_impl.cc
+++ b/webkit/plugins/ppapi/ppb_websocket_impl.cc
@@ -236,9 +236,10 @@ int32_t PPB_WebSocket_Impl::Close(uint16_t code,
}
// Check state.
- if (state_ == PP_WEBSOCKETREADYSTATE_CLOSING ||
- state_ == PP_WEBSOCKETREADYSTATE_CLOSED)
+ if (state_ == PP_WEBSOCKETREADYSTATE_CLOSING)
return PP_ERROR_INPROGRESS;
+ if (state_ == PP_WEBSOCKETREADYSTATE_CLOSED)
+ return PP_OK;
// Validate |callback| (Doesn't support blocking callback)
if (!callback.func)
« no previous file with comments | « ppapi/tests/test_websocket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698