summaryrefslogtreecommitdiffstats
path: root/ppapi/c
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-11 04:17:06 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-11 04:17:06 +0000
commite39690735bac27e261e00ad237d734827cf1e3c7 (patch)
tree7848d50c2ef186e8d1d99a29a50e06e98889a40a /ppapi/c
parent6fdefb06df4668407059c7dd4cfeaf1ff842b8eb (diff)
downloadchromium_src-e39690735bac27e261e00ad237d734827cf1e3c7.zip
chromium_src-e39690735bac27e261e00ad237d734827cf1e3c7.tar.gz
chromium_src-e39690735bac27e261e00ad237d734827cf1e3c7.tar.bz2
Prevent reentrant destructors in the PluginModule.
This makes us not hold a ref to the PluginModule during sending async messages. Previously we would cancel callbacks in the PluginModule destructor and this would change the ref count from 0 to 1, and then back to 0, calling reentrantly into the destructor again. Not holding a ref during async messages prevent this problem. I also added some checking to detect sync messages during shutdown, and also reentrant destructors should this happen again. BUG = http://crosbug.com/21258, http://crbug.com/99398 Review URL: http://codereview.chromium.org/8222021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104847 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r--ppapi/c/private/ppb_proxy_private.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ppapi/c/private/ppb_proxy_private.h b/ppapi/c/private/ppb_proxy_private.h
index 19d5a1e..eac3f57 100644
--- a/ppapi/c/private/ppb_proxy_private.h
+++ b/ppapi/c/private/ppb_proxy_private.h
@@ -10,7 +10,7 @@
#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_resource.h"
-#define PPB_PROXY_PRIVATE_INTERFACE "PPB_Proxy_Private;4"
+#define PPB_PROXY_PRIVATE_INTERFACE "PPB_Proxy_Private;5"
// Exposes functions needed by the out-of-process proxy to call into the
// renderer PPAPI implementation.
@@ -44,6 +44,9 @@ struct PPB_Proxy_Private {
// there must be a corresponding release call.
void (*AddRefModule)(PP_Module module);
void (*ReleaseModule)(PP_Module module);
+
+ // Allows asserts to be written for some bad conditions while cleaning up.
+ PP_Bool (*IsInModuleDestructor)(PP_Module module);
};
#endif // PPAPI_C_PRIVATE_PROXY_PRIVATE_H_