Commit 4e601fcf authored by polina@google.com's avatar polina@google.com

PPAPI: header comments on when PPP_Instance::DidDestroy and PPP_ShutdownModule

are called on trusted and untrusted implementations.

BUG=91758
TEST=n/a
Review URL: http://codereview.chromium.org/7576026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95835 0039d316-1c4b-4281-b951-d872f2087c98
parent 3ddc3713
...@@ -70,8 +70,12 @@ PP_EXPORT int32_t PPP_InitializeModule(PP_Module module, ...@@ -70,8 +70,12 @@ PP_EXPORT int32_t PPP_InitializeModule(PP_Module module,
* Since your module runs in a separate process, there's no need to free * Since your module runs in a separate process, there's no need to free
* allocated memory. There is also no need to free any resources since all of * allocated memory. There is also no need to free any resources since all of
* resources associated with an instance will be force-freed when that instance * resources associated with an instance will be force-freed when that instance
* is deleted. Moreover, this function will not be called when Chrome does * is deleted.
* "fast shutdown" of a web page. *
* <strong>Note:</strong> This function will always be skipped on untrusted
* (Native Client) implementations. This function may be skipped on trusted
* implementations in certain circumstances when Chrome does "fast shutdown"
* of a web page.
*/ */
PP_EXPORT void PPP_ShutdownModule(); PP_EXPORT void PPP_ShutdownModule();
/** /**
......
...@@ -89,17 +89,18 @@ interface PPP_Instance { ...@@ -89,17 +89,18 @@ interface PPP_Instance {
* instance but this isn't required; all resources associated with the deleted * instance but this isn't required; all resources associated with the deleted
* instance will be automatically freed when this function returns. * instance will be automatically freed when this function returns.
* *
* The instance identifier will still be valid during this call so the module * The instance identifier will still be valid during this call, so the module
* can perform cleanup-related tasks. Once this function returns, the * can perform cleanup-related tasks. Once this function returns, the
* <code>PP_Instance</code> handle will be invalid. This means that you can't * <code>PP_Instance</code> handle will be invalid. This means that you can't
* do any asynchronous operations like network requests or file writes from * do any asynchronous operations like network requests, file writes or
* this function since they will be immediately canceled. * messaging from this function since they will be immediately canceled.
* *
* <strong>Note:</strong> This function may be skipped in certain * <strong>Note:</strong> This function will always be skipped on untrusted
* circumstances when Chrome does "fast shutdown". Fast shutdown will happen * (Native Client) implementations. This function may be skipped on trusted
* in some cases when all module instances are being deleted, and no cleanup * implementations in certain circumstances when Chrome does "fast shutdown"
* functions will be called. The module will just be unloaded and the process * of a web page. Fast shutdown will happen in some cases when all module
* terminated. * instances are being deleted, and no cleanup functions will be called.
* The module will just be unloaded and the process terminated.
* *
* @param[in] instance A <code>PP_Instance</code> indentifying one instance * @param[in] instance A <code>PP_Instance</code> indentifying one instance
* of a module. * of a module.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* found in the LICENSE file. * found in the LICENSE file.
*/ */
/* From ppp.idl modified Thu Jul 21 16:38:20 2011. */ /* From ppp.idl modified Mon Aug 8 06:47:44 2011. */
#ifndef PPAPI_C_PPP_H_ #ifndef PPAPI_C_PPP_H_
#define PPAPI_C_PPP_H_ #define PPAPI_C_PPP_H_
...@@ -78,8 +78,12 @@ PP_EXPORT int32_t PPP_InitializeModule(PP_Module module, ...@@ -78,8 +78,12 @@ PP_EXPORT int32_t PPP_InitializeModule(PP_Module module,
* Since your module runs in a separate process, there's no need to free * Since your module runs in a separate process, there's no need to free
* allocated memory. There is also no need to free any resources since all of * allocated memory. There is also no need to free any resources since all of
* resources associated with an instance will be force-freed when that instance * resources associated with an instance will be force-freed when that instance
* is deleted. Moreover, this function will not be called when Chrome does * is deleted.
* "fast shutdown" of a web page. *
* <strong>Note:</strong> This function will always be skipped on untrusted
* (Native Client) implementations. This function may be skipped on trusted
* implementations in certain circumstances when Chrome does "fast shutdown"
* of a web page.
*/ */
PP_EXPORT void PPP_ShutdownModule(); PP_EXPORT void PPP_ShutdownModule();
/** /**
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* found in the LICENSE file. * found in the LICENSE file.
*/ */
/* From ppp_instance.idl modified Wed Jul 20 11:17:15 2011. */ /* From ppp_instance.idl modified Mon Aug 8 06:46:25 2011. */
#ifndef PPAPI_C_PPP_INSTANCE_H_ #ifndef PPAPI_C_PPP_INSTANCE_H_
#define PPAPI_C_PPP_INSTANCE_H_ #define PPAPI_C_PPP_INSTANCE_H_
...@@ -93,17 +93,18 @@ struct PPP_Instance { ...@@ -93,17 +93,18 @@ struct PPP_Instance {
* instance but this isn't required; all resources associated with the deleted * instance but this isn't required; all resources associated with the deleted
* instance will be automatically freed when this function returns. * instance will be automatically freed when this function returns.
* *
* The instance identifier will still be valid during this call so the module * The instance identifier will still be valid during this call, so the module
* can perform cleanup-related tasks. Once this function returns, the * can perform cleanup-related tasks. Once this function returns, the
* <code>PP_Instance</code> handle will be invalid. This means that you can't * <code>PP_Instance</code> handle will be invalid. This means that you can't
* do any asynchronous operations like network requests or file writes from * do any asynchronous operations like network requests, file writes or
* this function since they will be immediately canceled. * messaging from this function since they will be immediately canceled.
* *
* <strong>Note:</strong> This function may be skipped in certain * <strong>Note:</strong> This function will always be skipped on untrusted
* circumstances when Chrome does "fast shutdown". Fast shutdown will happen * (Native Client) implementations. This function may be skipped on trusted
* in some cases when all module instances are being deleted, and no cleanup * implementations in certain circumstances when Chrome does "fast shutdown"
* functions will be called. The module will just be unloaded and the process * of a web page. Fast shutdown will happen in some cases when all module
* terminated. * instances are being deleted, and no cleanup functions will be called.
* The module will just be unloaded and the process terminated.
* *
* @param[in] instance A <code>PP_Instance</code> indentifying one instance * @param[in] instance A <code>PP_Instance</code> indentifying one instance
* of a module. * of a module.
......
...@@ -58,11 +58,12 @@ class Instance { ...@@ -58,11 +58,12 @@ class Instance {
/// asynchronous operations like network requests or file writes from this /// asynchronous operations like network requests or file writes from this
/// destructor since they will be immediately canceled. /// destructor since they will be immediately canceled.
/// ///
/// <strong>Important note:</strong> This function may be skipped in certain /// <strong>Important note:</strong> This function will always be skipped on
/// circumstances when Chrome does "fast shutdown". Fast shutdown will happen /// untrusted (Native Client) implementations. This function may be skipped
/// in some cases when all plugin instances are being deleted, and no cleanup /// in certain circumstances when Chrome does "fast shutdown". Fast shutdown
/// functions will be called. The module will just be unloaded and the process /// will happen in some cases when all plugin instances are being deleted,
/// terminated. /// and no cleanup functions will be called. The module will just be unloaded
/// and the process terminated.
virtual ~Instance(); virtual ~Instance();
/// Returns the PP_Instance identifying this object. When using the PPAPI C++ /// Returns the PP_Instance identifying this object. When using the PPAPI C++
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment