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

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

Issue 9193013: WebSocket Pepper API: SetBinaryType() returned unexpected PP_FALSE (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for review 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 | « 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 a7fc973b2a8ec0009437f0290b5af59938bb784a..dc52f379773e9727a5f0cda34eeba052a395afb6 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;
}
« 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