Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Side by Side Diff: ppapi/c/ppp_messaging.h

Issue 16140011: Don't send PP_Vars/V8 values with cycles across PostMessage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/c/ppb_messaging.h ('k') | ppapi/cpp/instance.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 /* From ppp_messaging.idl modified Tue May 21 09:01:17 2013. */ 6 /* From ppp_messaging.idl modified Wed Jun 5 10:32:43 2013. */
7 7
8 #ifndef PPAPI_C_PPP_MESSAGING_H_ 8 #ifndef PPAPI_C_PPP_MESSAGING_H_
9 #define PPAPI_C_PPP_MESSAGING_H_ 9 #define PPAPI_C_PPP_MESSAGING_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h" 12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h" 13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_stdint.h" 14 #include "ppapi/c/pp_stdint.h"
15 #include "ppapi/c/pp_var.h" 15 #include "ppapi/c/pp_var.h"
16 16
(...skipping 28 matching lines...) Expand all
45 * 45 *
46 * @param[in] instance A <code>PP_Instance</code> identifying one instance 46 * @param[in] instance A <code>PP_Instance</code> identifying one instance
47 * of a module. 47 * of a module.
48 * @param[in] message A <code>PP_Var</code> which has been converted from a 48 * @param[in] message A <code>PP_Var</code> which has been converted from a
49 * JavaScript value. JavaScript array/object types are supported from Chrome 49 * JavaScript value. JavaScript array/object types are supported from Chrome
50 * M29 onward. All JavaScript values are copied when passing them to the 50 * M29 onward. All JavaScript values are copied when passing them to the
51 * plugin. 51 * plugin.
52 * 52 *
53 * When converting JavaScript arrays, any object properties whose name 53 * When converting JavaScript arrays, any object properties whose name
54 * is not an array index are ignored. When passing arrays and objects, the 54 * is not an array index are ignored. When passing arrays and objects, the
55 * entire reference graph will be converted and transferred, including 55 * entire reference graph will be converted and transferred. If the reference
56 * reference cycles if they exist. Since <code>PP_Var</code>s are ref-counted, 56 * graph has cycles, the message will not be sent and an error will be logged
57 * the author of the plugin must take care if they expect to receive vars with 57 * to the console.
58 * cycles. Cycles must be manually broken to correctly release the vars.
59 * 58 *
60 * The following JavaScript code invokes <code>HandleMessage</code>, passing 59 * The following JavaScript code invokes <code>HandleMessage</code>, passing
61 * the module instance on which it was invoked, with <code>message</code> 60 * the module instance on which it was invoked, with <code>message</code>
62 * being a string <code>PP_Var</code> containing "Hello world!" 61 * being a string <code>PP_Var</code> containing "Hello world!"
63 * 62 *
64 * <strong>Example:</strong> 63 * <strong>Example:</strong>
65 * 64 *
66 * @code 65 * @code
67 * 66 *
68 * <body> 67 * <body>
(...skipping 10 matching lines...) Expand all
79 void (*HandleMessage)(PP_Instance instance, struct PP_Var message); 78 void (*HandleMessage)(PP_Instance instance, struct PP_Var message);
80 }; 79 };
81 80
82 typedef struct PPP_Messaging_1_0 PPP_Messaging; 81 typedef struct PPP_Messaging_1_0 PPP_Messaging;
83 /** 82 /**
84 * @} 83 * @}
85 */ 84 */
86 85
87 #endif /* PPAPI_C_PPP_MESSAGING_H_ */ 86 #endif /* PPAPI_C_PPP_MESSAGING_H_ */
88 87
OLDNEW
« no previous file with comments | « ppapi/c/ppb_messaging.h ('k') | ppapi/cpp/instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698