diff options
author | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-22 00:48:54 +0000 |
---|---|---|
committer | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-22 00:48:54 +0000 |
commit | ce40e54e41a91a1b16b4c8fdcbf834efda338f3b (patch) | |
tree | b3019008caf6f3e714b8d4c96f402b53e049b5ca /ppapi | |
parent | c56a9dc7cc34d76e9588efee5ad8407f1c587128 (diff) | |
download | chromium_src-ce40e54e41a91a1b16b4c8fdcbf834efda338f3b.zip chromium_src-ce40e54e41a91a1b16b4c8fdcbf834efda338f3b.tar.gz chromium_src-ce40e54e41a91a1b16b4c8fdcbf834efda338f3b.tar.bz2 |
Update the Post/HandleMessage description for Array/Dictionary vars
More detail could be added on specifics of how the conversion happens if
required.
BUG=236958
Review URL: https://chromiumcodereview.appspot.com/15473002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201410 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/api/ppb_messaging.idl | 11 | ||||
-rw-r--r-- | ppapi/api/ppp_messaging.idl | 14 | ||||
-rw-r--r-- | ppapi/c/ppb_messaging.h | 13 | ||||
-rw-r--r-- | ppapi/c/ppp_messaging.h | 16 |
4 files changed, 40 insertions, 14 deletions
diff --git a/ppapi/api/ppb_messaging.idl b/ppapi/api/ppb_messaging.idl index 7c9a7ae..647f7f6 100644 --- a/ppapi/api/ppb_messaging.idl +++ b/ppapi/api/ppb_messaging.idl @@ -30,9 +30,14 @@ interface PPB_Messaging { * of a module. * @param[in] message A <code>PP_Var</code> containing the data to be sent to * JavaScript. - * Message can have a numeric, boolean, or string value; arrays and - * dictionaries are not yet supported. Ref-counted var types are copied, and - * are therefore not shared between the module instance and the browser. + * <code>message</code> can be any <code>PP_Var</code> type except + * <code>PP_VARTYPE_OBJECT</code>. Array/Dictionary types are supported from + * Chrome M29 onward. All var types are copied when passing them to + * JavaScript. + * + * When passing array or dictionary <code>PP_Var</code>s, the entire reference + * graph will be converted and transferred, including reference cycles if they + * exist. * * Listeners for message events in JavaScript code will receive an object * conforming to the HTML 5 <code>MessageEvent</code> interface. diff --git a/ppapi/api/ppp_messaging.idl b/ppapi/api/ppp_messaging.idl index 19bd71f..150f771 100644 --- a/ppapi/api/ppp_messaging.idl +++ b/ppapi/api/ppp_messaging.idl @@ -29,9 +29,17 @@ interface PPP_Messaging { * * @param[in] instance A <code>PP_Instance</code> identifying one instance * of a module. - * @param[in] message A <code>PP_Var</code> containing the data to be sent - * to JavaScript. Message can have an int32_t, double, bool, or string value - * (objects are not supported). + * @param[in] message A <code>PP_Var</code> which has been converted from a + * JavaScript value. JavaScript array/object types are supported from Chrome + * M29 onward. All JavaScript values are copied when passing them to the + * plugin. + * + * When converting JavaScript arrays, any object properties whose name + * is not an array index are ignored. When passing arrays and objects, the + * entire reference graph will be converted and transferred, including + * reference cycles if they exist. Since <code>PP_Var</code>s are ref-counted, + * the author of the plugin must take care if they expect to receive vars with + * cycles. Cycles must be manually broken to correctly release the vars. * * The following JavaScript code invokes <code>HandleMessage</code>, passing * the module instance on which it was invoked, with <code>message</code> diff --git a/ppapi/c/ppb_messaging.h b/ppapi/c/ppb_messaging.h index 31ed0a7..404a11c 100644 --- a/ppapi/c/ppb_messaging.h +++ b/ppapi/c/ppb_messaging.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From ppb_messaging.idl modified Thu Apr 26 13:16:11 2012. */ +/* From ppb_messaging.idl modified Mon May 20 15:31:07 2013. */ #ifndef PPAPI_C_PPB_MESSAGING_H_ #define PPAPI_C_PPB_MESSAGING_H_ @@ -44,9 +44,14 @@ struct PPB_Messaging_1_0 { * of a module. * @param[in] message A <code>PP_Var</code> containing the data to be sent to * JavaScript. - * Message can have a numeric, boolean, or string value; arrays and - * dictionaries are not yet supported. Ref-counted var types are copied, and - * are therefore not shared between the module instance and the browser. + * <code>message</code> can be any <code>PP_Var</code> type except + * <code>PP_VARTYPE_OBJECT</code>. Array/Dictionary types are supported from + * Chrome M29 onward. All var types are copied when passing them to + * JavaScript. + * + * When passing array or dictionary <code>PP_Var</code>s, the entire reference + * graph will be converted and transferred, including reference cycles if they + * exist. * * Listeners for message events in JavaScript code will receive an object * conforming to the HTML 5 <code>MessageEvent</code> interface. diff --git a/ppapi/c/ppp_messaging.h b/ppapi/c/ppp_messaging.h index 1448bb1..b2e1f3c 100644 --- a/ppapi/c/ppp_messaging.h +++ b/ppapi/c/ppp_messaging.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From ppp_messaging.idl modified Wed Jan 25 11:41:09 2012. */ +/* From ppp_messaging.idl modified Tue May 21 09:01:17 2013. */ #ifndef PPAPI_C_PPP_MESSAGING_H_ #define PPAPI_C_PPP_MESSAGING_H_ @@ -45,9 +45,17 @@ struct PPP_Messaging_1_0 { * * @param[in] instance A <code>PP_Instance</code> identifying one instance * of a module. - * @param[in] message A <code>PP_Var</code> containing the data to be sent - * to JavaScript. Message can have an int32_t, double, bool, or string value - * (objects are not supported). + * @param[in] message A <code>PP_Var</code> which has been converted from a + * JavaScript value. JavaScript array/object types are supported from Chrome + * M29 onward. All JavaScript values are copied when passing them to the + * plugin. + * + * When converting JavaScript arrays, any object properties whose name + * is not an array index are ignored. When passing arrays and objects, the + * entire reference graph will be converted and transferred, including + * reference cycles if they exist. Since <code>PP_Var</code>s are ref-counted, + * the author of the plugin must take care if they expect to receive vars with + * cycles. Cycles must be manually broken to correctly release the vars. * * The following JavaScript code invokes <code>HandleMessage</code>, passing * the module instance on which it was invoked, with <code>message</code> |