diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-15 01:44:47 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-15 01:44:47 +0000 |
commit | 4c41d3fd4bf9cfef6108f5f700d503820bcddba4 (patch) | |
tree | efc3cf9fdac963f1aa6449cea762408904a9f936 /ppapi/proxy/serialized_var_unittest.cc | |
parent | 0f9386895aa7a61246eaa95246cbc0f05d320eee (diff) | |
download | chromium_src-4c41d3fd4bf9cfef6108f5f700d503820bcddba4.zip chromium_src-4c41d3fd4bf9cfef6108f5f700d503820bcddba4.tar.gz chromium_src-4c41d3fd4bf9cfef6108f5f700d503820bcddba4.tar.bz2 |
reland 121901, PPAPI: Add unlocking for PPP calls and callbacks...
"""
With this patch, ppapi_tests pass locally when building with enable_pepper_threading=1. (They didn't before).
TODO: Test more calls off the main thread, make sync completion callbacks work.
BUG=92909
TEST=
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=121901
"""
TBR=dmichael@chromium.org
Review URL: http://codereview.chromium.org/9361065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/serialized_var_unittest.cc')
-rw-r--r-- | ppapi/proxy/serialized_var_unittest.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ppapi/proxy/serialized_var_unittest.cc b/ppapi/proxy/serialized_var_unittest.cc index e7c690c..f5c1dde 100644 --- a/ppapi/proxy/serialized_var_unittest.cc +++ b/ppapi/proxy/serialized_var_unittest.cc @@ -5,6 +5,7 @@ #include "ppapi/proxy/ppapi_proxy_test.h" #include "ppapi/proxy/serialized_var.h" +#include "ppapi/shared_impl/proxy_lock.h" namespace ppapi { namespace proxy { @@ -28,6 +29,7 @@ class SerializedVarTest : public PluginProxyTest { // Tests output arguments in the plugin. This is when the host calls into the // plugin and the plugin returns something via an out param, like an exception. TEST_F(SerializedVarTest, PluginSerializedVarInOutParam) { + ProxyAutoLock lock; PP_Var host_object = MakeObjectVar(0x31337); PP_Var plugin_object; @@ -77,6 +79,7 @@ TEST_F(SerializedVarTest, PluginSerializedVarInOutParam) { // Tests output strings in the plugin. This is when the host calls into the // plugin with a string and the plugin returns it via an out param. TEST_F(SerializedVarTest, PluginSerializedStringVarInOutParam) { + ProxyAutoLock lock; PP_Var plugin_string; const std::string kTestString("elite"); { @@ -118,6 +121,7 @@ TEST_F(SerializedVarTest, PluginSerializedStringVarInOutParam) { // Tests receiving an argument and passing it back to the browser as an output // parameter. TEST_F(SerializedVarTest, PluginSerializedVarOutParam) { + ProxyAutoLock lock; PP_Var host_object = MakeObjectVar(0x31337); // Start tracking this object in the plugin. @@ -157,6 +161,7 @@ TEST_F(SerializedVarTest, PluginSerializedVarOutParam) { // Tests the case that the plugin receives the same var twice as an input // parameter (not passing ownership). TEST_F(SerializedVarTest, PluginReceiveInput) { + ProxyAutoLock lock; PP_Var host_object = MakeObjectVar(0x31337); PP_Var plugin_object; @@ -197,6 +202,7 @@ TEST_F(SerializedVarTest, PluginReceiveInput) { // Tests the case that the plugin receives the same vars twice as an input // parameter (not passing ownership) within a vector. TEST_F(SerializedVarTest, PluginVectorReceiveInput) { + ProxyAutoLock lock; PP_Var host_object = MakeObjectVar(0x31337); PP_Var* plugin_objects; @@ -263,6 +269,7 @@ TEST_F(SerializedVarTest, PluginVectorReceiveInput) { // Tests the plugin receiving a var as a return value from the browser // two different times (passing ownership). TEST_F(SerializedVarTest, PluginReceiveReturn) { + ProxyAutoLock lock; PP_Var host_object = MakeObjectVar(0x31337); PP_Var plugin_object; @@ -306,6 +313,7 @@ TEST_F(SerializedVarTest, PluginReceiveReturn) { // Returns a value from the browser to the plugin, then return that one ref // back to the browser. TEST_F(SerializedVarTest, PluginReturnValue) { + ProxyAutoLock lock; PP_Var host_object = MakeObjectVar(0x31337); PP_Var plugin_object; |