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

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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // | var data | 44 // | var data |
45 // | .... | 45 // | .... |
46 // 46 //
47 // Vars that reference other vars (such as Arrays or Dictionaries) use indices 47 // Vars that reference other vars (such as Arrays or Dictionaries) use indices
48 // into the message to denote which PP_Var is pointed to. 48 // into the message to denote which PP_Var is pointed to.
49 class PPAPI_PROXY_EXPORT RawVarDataGraph { 49 class PPAPI_PROXY_EXPORT RawVarDataGraph {
50 public: 50 public:
51 // Construct a RawVarDataGraph from a given root PP_Var. A null pointer 51 // Construct a RawVarDataGraph from a given root PP_Var. A null pointer
52 // is returned upon failure. 52 // is returned upon failure.
53 static scoped_ptr<RawVarDataGraph> Create(const PP_Var& var, 53 static scoped_ptr<RawVarDataGraph> Create(const PP_Var& var,
54 PP_Instance instance); 54 PP_Instance instance,
55 bool allow_cycles);
dmichael (off chromium) 2013/06/04 16:59:10 Why have this parameter? Why not just disallow cyc
raymes 2013/06/04 19:36:06 Done.
55 56
56 // Constructs an empty RawVarDataGraph. 57 // Constructs an empty RawVarDataGraph.
57 RawVarDataGraph(); 58 RawVarDataGraph();
58 ~RawVarDataGraph(); 59 ~RawVarDataGraph();
59 60
60 // Construct a new PP_Var from the graph. All of the PP_Vars referenced by 61 // 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 62 // 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. 63 // 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. 64 // The returned var (the "root") has one additional reference.
64 PP_Var CreatePPVar(PP_Instance instance); 65 PP_Var CreatePPVar(PP_Instance instance);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 PickleIterator* iter) OVERRIDE; 255 PickleIterator* iter) OVERRIDE;
255 256
256 private: 257 private:
257 std::vector<std::pair<std::string, size_t> > children_; 258 std::vector<std::pair<std::string, size_t> > children_;
258 }; 259 };
259 260
260 } // namespace proxy 261 } // namespace proxy
261 } // namespace ppapi 262 } // namespace ppapi
262 263
263 #endif // PPAPI_PROXY_RAW_VAR_DATA_H_ 264 #endif // PPAPI_PROXY_RAW_VAR_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698