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

Unified Diff: trunk/src/content/renderer/v8_value_converter_impl.h

Issue 16511004: Revert 205184 "Revert 204057 "Recurse to a maximum depth of 10 i..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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
Index: trunk/src/content/renderer/v8_value_converter_impl.h
===================================================================
--- trunk/src/content/renderer/v8_value_converter_impl.h (revision 205208)
+++ trunk/src/content/renderer/v8_value_converter_impl.h (working copy)
@@ -39,8 +39,9 @@
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;
v8::Handle<v8::Value> ToV8Object(
@@ -48,9 +49,9 @@
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,16 +59,8 @@
base::BinaryValue* FromV8Buffer(v8::Handle<v8::Value> value) const;
base::Value* FromV8Object(v8::Handle<v8::Object> object,
- HashToHandleMap* unique_map) const;
+ FromV8ValueState* state) 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;
-
// If true, we will convert Date JavaScript objects to doubles.
bool date_allowed_;

Powered by Google App Engine
This is Rietveld 408576698