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

Side by Side Diff: ppapi/proxy/raw_var_data.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/proxy/ppb_instance_proxy.cc ('k') | ppapi/proxy/raw_var_data.cc » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef PPAPI_PROXY_RAW_VAR_DATA_H_ 5 #ifndef PPAPI_PROXY_RAW_VAR_DATA_H_
6 #define PPAPI_PROXY_RAW_VAR_DATA_H_ 6 #define PPAPI_PROXY_RAW_VAR_DATA_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 ~RawVarDataGraph(); 58 ~RawVarDataGraph();
59 59
60 // Construct a new PP_Var from the graph. All of the PP_Vars referenced by 60 // Construct a new PP_Var from the graph. All of the PP_Vars referenced by
61 // the returned PP_Var are also constructed. Each PP_Var created has a 61 // the returned PP_Var are also constructed. Each PP_Var created has a
62 // ref-count equal to the number of references it has in the graph of vars. 62 // ref-count equal to the number of references it has in the graph of vars.
63 // The returned var (the "root") has one additional reference. 63 // The returned var (the "root") has one additional reference.
64 PP_Var CreatePPVar(PP_Instance instance); 64 PP_Var CreatePPVar(PP_Instance instance);
65 65
66 // Write the graph to a message using the given HandleWriter. 66 // Write the graph to a message using the given HandleWriter.
67 void Write(IPC::Message* m, const HandleWriter& handle_writer); 67 void Write(IPC::Message* m, const HandleWriter& handle_writer);
68 // Write the graph to a message using the default handle writer.
69 void Write(IPC::Message* m);
70 68
71 // Create a RawVarDataGraph from the given message. 69 // Create a RawVarDataGraph from the given message.
72 static scoped_ptr<RawVarDataGraph> Read(const IPC::Message* m, 70 static scoped_ptr<RawVarDataGraph> Read(const IPC::Message* m,
73 PickleIterator* iter); 71 PickleIterator* iter);
74 72
75 // Returns a vector of SerializedHandles associated with this RawVarDataGraph. 73 // Returns a vector of SerializedHandles associated with this RawVarDataGraph.
76 // Ownership of the pointers remains with the elements of the RawVarDataGraph. 74 // Ownership of the pointers remains with the elements of the RawVarDataGraph.
77 std::vector<SerializedHandle*> GetHandles(); 75 std::vector<SerializedHandle*> GetHandles();
78 76
79 // Sets the threshold size at which point we switch from transmitting 77 // Sets the threshold size at which point we switch from transmitting
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 PickleIterator* iter) OVERRIDE; 252 PickleIterator* iter) OVERRIDE;
255 253
256 private: 254 private:
257 std::vector<std::pair<std::string, size_t> > children_; 255 std::vector<std::pair<std::string, size_t> > children_;
258 }; 256 };
259 257
260 } // namespace proxy 258 } // namespace proxy
261 } // namespace ppapi 259 } // namespace ppapi
262 260
263 #endif // PPAPI_PROXY_RAW_VAR_DATA_H_ 261 #endif // PPAPI_PROXY_RAW_VAR_DATA_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.cc ('k') | ppapi/proxy/raw_var_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698