Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index fb07e9ce8c68cdf94d29665cafa614b265b31b8f..0bc9d6453d476710776ba1d3ac954d479491a50b 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -2958,10 +2958,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. |
+ */ |
+ static V8_WARN_UNUSED_RESULT MaybeLocal<Map> FromArray(Local<Context> context, |
+ Local<Array> array); |
+ |
V8_INLINE static Map* Cast(Value* obj); |
private: |
@@ -2983,10 +2991,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: |