summaryrefslogtreecommitdiffstats
path: root/ppapi/c
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-18 20:51:18 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-18 20:51:18 +0000
commit3502a996955e749fa48f202ee27a63fbda528c03 (patch)
tree68f02d46f25c94cc4efee9116c84c69e5da59a57 /ppapi/c
parent88ddb358c1ccf049220487925ea9831e5f8ea452 (diff)
downloadchromium_src-3502a996955e749fa48f202ee27a63fbda528c03.zip
chromium_src-3502a996955e749fa48f202ee27a63fbda528c03.tar.gz
chromium_src-3502a996955e749fa48f202ee27a63fbda528c03.tar.bz2
Keep the module in scope when executing scripts. This prevents a crash when the
script deletes the plugin object synchronously. This in turn deletes the dispatcher which will make the code returning the out param and exception to the plugin crash. To prevent the crash, this patch adds a way for the proxy to manipulate the refcount of the plugin object so that it's still alive when as long as the scripting message is being processed. A manual test is included. This is not automatically run now. I tried to fit it into the current test infrastructure and found it very challenging, We need to revisit this to allow custom tests to more easily be written. TEST=manual with included plugin and html BUG=none Review URL: http://codereview.chromium.org/6881012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81993 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r--ppapi/c/private/ppb_proxy_private.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ppapi/c/private/ppb_proxy_private.h b/ppapi/c/private/ppb_proxy_private.h
index e1e133e..19d5a1e 100644
--- a/ppapi/c/private/ppb_proxy_private.h
+++ b/ppapi/c/private/ppb_proxy_private.h
@@ -38,6 +38,12 @@ struct PPB_Proxy_Private {
// buffer. Returns 0 on failure or if the url loader doesn't have any data
// now.
int32_t (*GetURLLoaderBufferedBytes)(PP_Resource url_loader);
+
+ // Allows adding additional refcounts to the PluginModule that owns the
+ // proxy dispatcher (and all interface proxies). For every AddRef call
+ // there must be a corresponding release call.
+ void (*AddRefModule)(PP_Module module);
+ void (*ReleaseModule)(PP_Module module);
};
#endif // PPAPI_C_PRIVATE_PROXY_PRIVATE_H_