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

Unified Diff: ppapi/thunk/ppb_websocket_thunk.cc

Issue 9097008: WebSocket Pepper API: fix wrong return code on thunk (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_websocket_thunk.cc
diff --git a/ppapi/thunk/ppb_websocket_thunk.cc b/ppapi/thunk/ppb_websocket_thunk.cc
index 1f49c3e3de793eac3c81e1eedd48a77446dd934f..ca12d6bb7e0bfed3ae3150750f42d296746740d4 100644
--- a/ppapi/thunk/ppb_websocket_thunk.cc
+++ b/ppapi/thunk/ppb_websocket_thunk.cc
@@ -71,14 +71,14 @@ int32_t SendMessage(PP_Resource resource, PP_Var message) {
uint64_t GetBufferedAmount(PP_Resource resource) {
EnterResource<PPB_WebSocket_API> enter(resource, false);
if (enter.failed())
- return PP_ERROR_BADRESOURCE;
+ return 0;
return enter.object()->GetBufferedAmount();
}
uint16_t GetCloseCode(PP_Resource resource) {
EnterResource<PPB_WebSocket_API> enter(resource, false);
if (enter.failed())
- return PP_ERROR_BADRESOURCE;
+ return 0;
return enter.object()->GetCloseCode();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698