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

Side by Side Diff: ppapi/api/ppb_messaging.idl

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 | « no previous file | ppapi/api/ppp_messaging.idl » ('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 /** 6 /**
7 * This file defines the <code>PPB_Messaging</code> interface implemented 7 * This file defines the <code>PPB_Messaging</code> interface implemented
8 * by the browser for sending messages to DOM elements associated with a 8 * by the browser for sending messages to DOM elements associated with a
9 * specific module instance. 9 * specific module instance.
10 */ 10 */
(...skipping 18 matching lines...) Expand all
29 * @param[in] instance A <code>PP_Instance</code> identifying one instance 29 * @param[in] instance A <code>PP_Instance</code> identifying one instance
30 * of a module. 30 * of a module.
31 * @param[in] message A <code>PP_Var</code> containing the data to be sent to 31 * @param[in] message A <code>PP_Var</code> containing the data to be sent to
32 * JavaScript. 32 * JavaScript.
33 * <code>message</code> can be any <code>PP_Var</code> type except 33 * <code>message</code> can be any <code>PP_Var</code> type except
34 * <code>PP_VARTYPE_OBJECT</code>. Array/Dictionary types are supported from 34 * <code>PP_VARTYPE_OBJECT</code>. Array/Dictionary types are supported from
35 * Chrome M29 onward. All var types are copied when passing them to 35 * Chrome M29 onward. All var types are copied when passing them to
36 * JavaScript. 36 * JavaScript.
37 * 37 *
38 * When passing array or dictionary <code>PP_Var</code>s, the entire reference 38 * When passing array or dictionary <code>PP_Var</code>s, the entire reference
39 * graph will be converted and transferred, including reference cycles if they 39 * graph will be converted and transferred. If the reference graph has cycles,
40 * exist. 40 * the message will not be sent and an error will be logged to the console.
41 * 41 *
42 * Listeners for message events in JavaScript code will receive an object 42 * Listeners for message events in JavaScript code will receive an object
43 * conforming to the HTML 5 <code>MessageEvent</code> interface. 43 * conforming to the HTML 5 <code>MessageEvent</code> interface.
44 * Specifically, the value of message will be contained as a property called 44 * Specifically, the value of message will be contained as a property called
45 * data in the received <code>MessageEvent</code>. 45 * data in the received <code>MessageEvent</code>.
46 * 46 *
47 * This messaging system is similar to the system used for listening for 47 * This messaging system is similar to the system used for listening for
48 * messages from Web Workers. Refer to 48 * messages from Web Workers. Refer to
49 * <code>http://www.whatwg.org/specs/web-workers/current-work/</code> for 49 * <code>http://www.whatwg.org/specs/web-workers/current-work/</code> for
50 * further information. 50 * further information.
(...skipping 26 matching lines...) Expand all
77 * ppb_messaging_interface->PostMessage(instance, hello_var); // Copies var. 77 * ppb_messaging_interface->PostMessage(instance, hello_var); // Copies var.
78 * ppb_var_interface->Release(hello_var); 78 * ppb_var_interface->Release(hello_var);
79 * 79 *
80 * @endcode 80 * @endcode
81 * 81 *
82 * The browser will pop-up an alert saying "Hello world!" 82 * The browser will pop-up an alert saying "Hello world!"
83 */ 83 */
84 void PostMessage([in] PP_Instance instance, [in] PP_Var message); 84 void PostMessage([in] PP_Instance instance, [in] PP_Var message);
85 }; 85 };
86 86
OLDNEW
« no previous file with comments | « no previous file | ppapi/api/ppp_messaging.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698