diff options
author | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-24 02:44:44 +0000 |
---|---|---|
committer | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-24 02:44:44 +0000 |
commit | 8a825a77279ce099a99fc1a1c2157ddf4f3fde1a (patch) | |
tree | d75bcf1be6ace0db0f661105159226358076e8fe /webkit/plugins/ppapi | |
parent | a7c03d4f3c5b36df2375ff24d5e279221ae65ed1 (diff) | |
download | chromium_src-8a825a77279ce099a99fc1a1c2157ddf4f3fde1a.zip chromium_src-8a825a77279ce099a99fc1a1c2157ddf4f3fde1a.tar.gz chromium_src-8a825a77279ce099a99fc1a1c2157ddf4f3fde1a.tar.bz2 |
WebSocket Pepper API: SetBinaryType() returned unexpected PP_FALSE
Usually, the websocket_ doesn't have an object when SetBinaryType() is called.
BUG=87310
TEST=ui_tests --gtest_filter='*WebSocket_CcInterfaces'
Review URL: http://codereview.chromium.org/9193013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi')
-rw-r--r-- | webkit/plugins/ppapi/ppb_websocket_impl.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/webkit/plugins/ppapi/ppb_websocket_impl.cc b/webkit/plugins/ppapi/ppb_websocket_impl.cc index a7fc973..dc52f37 100644 --- a/webkit/plugins/ppapi/ppb_websocket_impl.cc +++ b/webkit/plugins/ppapi/ppb_websocket_impl.cc @@ -425,9 +425,11 @@ PP_Bool PPB_WebSocket_Impl::SetBinaryType( default: return PP_FALSE; } - if (!websocket_.get()) - return PP_FALSE; - websocket_->setBinaryType(binary_type_); + // WebKit API setBinaryType() is called when Connect() is called. + // If the websocket_ contains an object; it means Connect() is already + // called, call WebKit API here to reflect the setting as soon as possible. + if (websocket_.get()) + websocket_->setBinaryType(binary_type_); return PP_TRUE; } |