summaryrefslogtreecommitdiffstats
path: root/ppapi/api
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-16 20:10:55 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-16 20:10:55 +0000
commite655a951994dcafb7203d6824b90dfef6e445dca (patch)
tree18b9126b21efd9e63f74149263753031ec393ae8 /ppapi/api
parentc96312d46205ea82764aba6255ecbb8dd5f57d11 (diff)
downloadchromium_src-e655a951994dcafb7203d6824b90dfef6e445dca.zip
chromium_src-e655a951994dcafb7203d6824b90dfef6e445dca.tar.gz
chromium_src-e655a951994dcafb7203d6824b90dfef6e445dca.tar.bz2
Add a new error code for a null callback on the main thread.
Convert the NaCl and ChromeIPC proxies to use the new value. Review URL: http://codereview.chromium.org/7885014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api')
-rw-r--r--ppapi/api/pp_errors.idl32
1 files changed, 29 insertions, 3 deletions
diff --git a/ppapi/api/pp_errors.idl b/ppapi/api/pp_errors.idl
index 950b77b..bd49081 100644
--- a/ppapi/api/pp_errors.idl
+++ b/ppapi/api/pp_errors.idl
@@ -9,7 +9,10 @@
/**
* This enumeration contains enumerators of all PPAPI error codes.
- * Errors are negative valued.
+ *
+ * Errors are negative valued. Callers should treat all negative values as a
+ * failure, even if it's not in the list, since the possible errors are likely
+ * to expand and change over time.
*/
[unnamed] enum PP_Error {
/**
@@ -26,11 +29,20 @@
*/
PP_OK_COMPLETIONPENDING = -1,
- /** This value indicates failure for unspecified reasons. */
+ /**This value indicates failure for unspecified reasons. */
PP_ERROR_FAILED = -2,
+
/**
* This value indicates failure due to an asynchronous operation being
- * interrupted, typically as a result of user action.
+ * interrupted. The most common cause of this error code is destroying a
+ * resource that still has a callback pending. All callbacks are guaranteed
+ * to execute, so any callbacks pending on a destroyed resource will be
+ * issued with PP_ERROR_ABORTED.
+ *
+ * If you get an aborted notification that you aren't expecting, check to
+ * make sure that the resource you're using is still in scope. A common
+ * mistake is to create a resource on the stack, which will destroy the
+ * resource as soon as the function returns.
*/
PP_ERROR_ABORTED = -3,
@@ -67,6 +79,20 @@
*/
PP_ERROR_NOTSUPPORTED = -12,
+ /**
+ * Returned if you try to use a null completion callback to "block until
+ * complete" on the main thread. Blocking the main thread is not permitted
+ * to keep the browser responsive (otherwise, you may not be able to handle
+ * input events, and there are reentrancy and deadlock issues).
+ *
+ * The goal is to provide blocking calls from background threads, but PPAPI
+ * calls on background threads are not currently supported. Until this
+ * support is complete, you must either do asynchronous operations on the
+ * main thread, or provide an adaptor for a blocking background thread to
+ * execute the operaitions on the main thread.
+ */
+ PP_ERROR_BLOCKS_MAIN_THREAD = -13,
+
PP_ERROR_FILENOTFOUND = -20,
/** This value indicates failure due to a file that already exists. */
PP_ERROR_FILEEXISTS = -21,