Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 00bc3364bb8edbaef662039533c5432c52e6ba56..a7390555d565fe683d5d9001a90cb25b0c05c7f9 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -2976,10 +2976,18 @@ class V8_EXPORT Map : public Object { |
Local<Array> AsArray() const; |
/** |
- * Creates a new Map. |
+ * Creates a new empty Map. |
*/ |
static Local<Map> New(Isolate* isolate); |
+ /** |
+ * Creates a new Map containing the elements of array, which must be comprised |
+ * of [key, value] arrays. |
+ * Guaranteed to be side-effect free if the array contains no holes. |
arv (Not doing code reviews)
2015/05/26 16:37:40
If the main use case is structured clone we could
adamk
2015/05/26 17:27:44
Let's leave this for a later round where we optimi
|
+ */ |
+ static V8_WARN_UNUSED_RESULT MaybeLocal<Map> FromArray(Local<Context> context, |
+ Local<Array> array); |
+ |
V8_INLINE static Map* Cast(Value* obj); |
private: |
@@ -3001,10 +3009,17 @@ class V8_EXPORT Set : public Object { |
Local<Array> AsArray() const; |
/** |
- * Creates a new Set. |
+ * Creates a new empty Set. |
*/ |
static Local<Set> New(Isolate* isolate); |
+ /** |
+ * Creates a new Set containing the items in array. |
+ * Guaranteed to be side-effect free if the array contains no holes. |
+ */ |
+ static V8_WARN_UNUSED_RESULT MaybeLocal<Set> FromArray(Local<Context> context, |
+ Local<Array> array); |
+ |
V8_INLINE static Set* Cast(Value* obj); |
private: |