diff options
author | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 04:25:23 +0000 |
---|---|---|
committer | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 04:25:23 +0000 |
commit | d1b03d7a50a3b6642a1b59584c9cc0e45d6b39f6 (patch) | |
tree | 3ef114b0cb0df592d73a7ba58b25be5fbe4b1dba /ppapi | |
parent | 137925e09894efbbe5c186c9fe353c3936618667 (diff) | |
download | chromium_src-d1b03d7a50a3b6642a1b59584c9cc0e45d6b39f6.zip chromium_src-d1b03d7a50a3b6642a1b59584c9cc0e45d6b39f6.tar.gz chromium_src-d1b03d7a50a3b6642a1b59584c9cc0e45d6b39f6.tar.bz2 |
WebSocket Pepper API: fix wrong return code on thunk
Some thunk functions returned PP_ERROR_BADRESOURCE for EnterResource failure
though returning value is not int32_t error code.
BUG=87310
TEST=ui_tests --gtest_filter='PPAPI*.WebSocket_*'
Review URL: http://codereview.chromium.org/9097008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/thunk/ppb_websocket_thunk.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ppapi/thunk/ppb_websocket_thunk.cc b/ppapi/thunk/ppb_websocket_thunk.cc index 1f49c3e..ca12d6b 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(); } |