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

Unified Diff: webkit/plugins/ppapi/v8_var_converter.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/message_channel.cc ('k') | webkit/plugins/ppapi/v8_var_converter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/v8_var_converter.h
diff --git a/webkit/plugins/ppapi/v8_var_converter.h b/webkit/plugins/ppapi/v8_var_converter.h
index c19644cdf890020847d5920094ad18dd5d9b0afe..9dcae4f87d58dfa586fd878159c142f1e4e3acd1 100644
--- a/webkit/plugins/ppapi/v8_var_converter.h
+++ b/webkit/plugins/ppapi/v8_var_converter.h
@@ -14,27 +14,21 @@
namespace webkit {
namespace ppapi {
-
-// Class to convert between PP_Vars and V8 values.
-class WEBKIT_PLUGINS_EXPORT V8VarConverter {
- public:
- V8VarConverter();
-
- // Converts the given PP_Var to a v8::Value. True is returned upon success.
- bool ToV8Value(const PP_Var& var,
- v8::Handle<v8::Context> context,
- v8::Handle<v8::Value>* result) const;
- // Converts the given v8::Value to a PP_Var. True is returned upon success.
- // Every PP_Var in the reference graph of which |result| is apart will have
- // a refcount equal to the number of references to it in the graph. |result|
- // will have one additional reference.
- bool FromV8Value(v8::Handle<v8::Value> val,
- v8::Handle<v8::Context> context,
- PP_Var* result) const;
-
- DISALLOW_COPY_AND_ASSIGN(V8VarConverter);
-};
-
+namespace V8VarConverter {
+
+// Converts the given PP_Var to a v8::Value. True is returned upon success.
+bool WEBKIT_PLUGINS_EXPORT ToV8Value(const PP_Var& var,
+ v8::Handle<v8::Context> context,
+ v8::Handle<v8::Value>* result);
+// Converts the given v8::Value to a PP_Var. True is returned upon success.
+// Every PP_Var in the reference graph of which |result| is apart will have
+// a refcount equal to the number of references to it in the graph. |result|
+// will have one additional reference.
+bool WEBKIT_PLUGINS_EXPORT FromV8Value(v8::Handle<v8::Value> val,
+ v8::Handle<v8::Context> context,
+ PP_Var* result);
+
+} // namespace V8VarConverter
} // namespace ppapi
} // namespace webkit
« no previous file with comments | « webkit/plugins/ppapi/message_channel.cc ('k') | webkit/plugins/ppapi/v8_var_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698