Skip to content

Commit

Permalink
PPAPI: header comments on when PPP_Instance::DidDestroy and PPP_Shutd…
Browse files Browse the repository at this point in the history
…ownModule

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
  • Loading branch information
polina@google.com committed Aug 8, 2011
1 parent 3ddc371 commit 4e601fc
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 29 deletions.
8 changes: 6 additions & 2 deletions ppapi/api/ppp.idl
Original file line number Diff line number Diff line change
Expand Up @@ -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
* 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
* is deleted. Moreover, this function will not be called when Chrome does
* "fast shutdown" of a web page.
* is deleted.
*
* <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();
/**
Expand Down
19 changes: 10 additions & 9 deletions ppapi/api/ppp_instance.idl
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,18 @@ interface PPP_Instance {
* instance but this isn't required; all resources associated with the deleted
* 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
* <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
* this function since they will be immediately canceled.
*
* <strong>Note:</strong> This function may be skipped in certain
* circumstances when Chrome does "fast shutdown". Fast shutdown will happen
* in some cases when all module instances are being deleted, and no cleanup
* functions will be called. The module will just be unloaded and the process
* terminated.
* do any asynchronous operations like network requests, file writes or
* messaging from this function since they will be immediately canceled.
*
* <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. Fast shutdown will happen in some cases when all module
* 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
* of a module.
Expand Down
10 changes: 7 additions & 3 deletions ppapi/c/ppp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* 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_
#define PPAPI_C_PPP_H_
Expand Down Expand Up @@ -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
* 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
* is deleted. Moreover, this function will not be called when Chrome does
* "fast shutdown" of a web page.
* is deleted.
*
* <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();
/**
Expand Down
21 changes: 11 additions & 10 deletions ppapi/c/ppp_instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* 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_
#define PPAPI_C_PPP_INSTANCE_H_
Expand Down Expand Up @@ -93,17 +93,18 @@ struct PPP_Instance {
* instance but this isn't required; all resources associated with the deleted
* 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
* <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
* this function since they will be immediately canceled.
*
* <strong>Note:</strong> This function may be skipped in certain
* circumstances when Chrome does "fast shutdown". Fast shutdown will happen
* in some cases when all module instances are being deleted, and no cleanup
* functions will be called. The module will just be unloaded and the process
* terminated.
* do any asynchronous operations like network requests, file writes or
* messaging from this function since they will be immediately canceled.
*
* <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. Fast shutdown will happen in some cases when all module
* 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
* of a module.
Expand Down
11 changes: 6 additions & 5 deletions ppapi/cpp/instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ class Instance {
/// asynchronous operations like network requests or file writes from this
/// destructor since they will be immediately canceled.
///
/// <strong>Important note:</strong> This function may be skipped in certain
/// circumstances when Chrome does "fast shutdown". Fast shutdown will happen
/// in some cases when all plugin instances are being deleted, and no cleanup
/// functions will be called. The module will just be unloaded and the process
/// terminated.
/// <strong>Important note:</strong> This function will always be skipped on
/// untrusted (Native Client) implementations. This function may be skipped
/// in certain circumstances when Chrome does "fast shutdown". Fast shutdown
/// will happen in some cases when all plugin instances are being deleted,
/// and no cleanup functions will be called. The module will just be unloaded
/// and the process terminated.
virtual ~Instance();

/// Returns the PP_Instance identifying this object. When using the PPAPI C++
Expand Down

0 comments on commit 4e601fc

Please sign in to comment.