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

Unified Diff: content/renderer/v8_value_converter_impl.h

Issue 16295013: Only recurse to depth 10 in v8_value_converter_impl.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: std::make_pari Created 7 years, 7 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
Index: content/renderer/v8_value_converter_impl.h
diff --git a/content/renderer/v8_value_converter_impl.h b/content/renderer/v8_value_converter_impl.h
index 4f58849d9515850a3358d58d8322e170d7eb714c..f5ad10a4b81476d240ff5f74561c460fdb755fb6 100644
--- a/content/renderer/v8_value_converter_impl.h
+++ b/content/renderer/v8_value_converter_impl.h
@@ -39,7 +39,8 @@ class CONTENT_EXPORT V8ValueConverterImpl : public V8ValueConverter {
private:
friend class ScopedAvoidIdentityHashForTesting;
- typedef std::multimap<int, v8::Handle<v8::Object> > HashToHandleMap;
+
+ class FromV8ValueState;
v8::Handle<v8::Value> ToV8ValueImpl(const base::Value* value) const;
v8::Handle<v8::Value> ToV8Array(const base::ListValue* list) const;
@@ -48,9 +49,9 @@ class CONTENT_EXPORT V8ValueConverterImpl : public V8ValueConverter {
v8::Handle<v8::Value> ToArrayBuffer(const base::BinaryValue* value) const;
base::Value* FromV8ValueImpl(v8::Handle<v8::Value> value,
- HashToHandleMap* unique_map) const;
+ FromV8ValueState* state) const;
base::Value* FromV8Array(v8::Handle<v8::Array> array,
- HashToHandleMap* unique_map) const;
+ FromV8ValueState* state) const;
// This will convert objects of type ArrayBuffer or any of the
// ArrayBufferView subclasses. The return value will be NULL if |value| is
@@ -58,15 +59,7 @@ class CONTENT_EXPORT V8ValueConverterImpl : public V8ValueConverter {
base::BinaryValue* FromV8Buffer(v8::Handle<v8::Value> value) const;
base::Value* FromV8Object(v8::Handle<v8::Object> object,
- HashToHandleMap* unique_map) const;
-
- // If |handle| is not in |map|, then add it to |map| and return true.
- // Otherwise do nothing and return false. Here "A is unique" means that no
- // other handle B in the map points to the same object as A. Note that A can
- // be unique even if there already is another handle with the same identity
- // hash (key) in the map, because two objects can have the same hash.
- bool UpdateAndCheckUniqueness(HashToHandleMap* map,
- v8::Handle<v8::Object> handle) const;
+ FromV8ValueState* state) const;
// If true, we will convert Date JavaScript objects to doubles.
bool date_allowed_;
« no previous file with comments | « chrome/test/data/extensions/api_test/executescript/callback/test.js ('k') | content/renderer/v8_value_converter_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698