diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-04 17:47:17 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-04 17:47:17 +0000 |
commit | 55801ac3a9d6ea284fa27350ffa59e39197f3aca (patch) | |
tree | 7c4a8fdc68117f4fe77153846be44f1bc164d84d /ppapi | |
parent | 2f0c9bd240b4ae5b76b60c7b8d5570e8ff4f3044 (diff) | |
download | chromium_src-55801ac3a9d6ea284fa27350ffa59e39197f3aca.zip chromium_src-55801ac3a9d6ea284fa27350ffa59e39197f3aca.tar.gz chromium_src-55801ac3a9d6ea284fa27350ffa59e39197f3aca.tar.bz2 |
Remove assertion when destroying a plugin that doesn't exist. The DidDestroy
function will always be called, so the proxy should always add it regardless
of the initialization status.
I also did some clarification of the Destroy path.
BUG=78112
Review URL: http://codereview.chromium.org/6706025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80336 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/c/ppp_instance.h | 4 | ||||
-rw-r--r-- | ppapi/proxy/ppp_instance_proxy.cc | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/ppapi/c/ppp_instance.h b/ppapi/c/ppp_instance.h index d5099e1..99b3cc3 100644 --- a/ppapi/c/ppp_instance.h +++ b/ppapi/c/ppp_instance.h @@ -74,6 +74,10 @@ struct PPP_Instance { * even if DidCreate returned failure. The function should deallocate any data * associated with the instance. * + * The instance identifier will still be valid so the plugin can perform + * cleanup-related tasks. Once this function is called, the PP_Instance will + * be invalid. + * * @param[in] instance A PP_Instance indentifying one instance of a module. */ void (*DidDestroy)(PP_Instance instance); diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc index bb0ad79..393f031 100644 --- a/ppapi/proxy/ppp_instance_proxy.cc +++ b/ppapi/proxy/ppp_instance_proxy.cc @@ -186,11 +186,6 @@ void PPP_Instance_Proxy::OnMsgDidCreate( *result = ppp_instance_target()->DidCreate(instance, static_cast<uint32_t>(argn.size()), &argn_array[0], &argv_array[0]); - if (!*result) { - // In the failure to create case, this plugin instance will be torn down - // without further notification, so we also need to undo the routing. - plugin_dispatcher->DidDestroyInstance(instance); - } } void PPP_Instance_Proxy::OnMsgDidDestroy(PP_Instance instance) { |