@@ -1823,37 +1823,31 @@ class V8_EXPORT Value : public Data {
18231823
18241824 /**
18251825 * Returns true if this value is a Map.
1826- * This is an experimental feature.
18271826 */
18281827 bool IsMap() const;
18291828
18301829 /**
18311830 * Returns true if this value is a Set.
1832- * This is an experimental feature.
18331831 */
18341832 bool IsSet() const;
18351833
18361834 /**
18371835 * Returns true if this value is a Map Iterator.
1838- * This is an experimental feature.
18391836 */
18401837 bool IsMapIterator() const;
18411838
18421839 /**
18431840 * Returns true if this value is a Set Iterator.
1844- * This is an experimental feature.
18451841 */
18461842 bool IsSetIterator() const;
18471843
18481844 /**
18491845 * Returns true if this value is a WeakMap.
1850- * This is an experimental feature.
18511846 */
18521847 bool IsWeakMap() const;
18531848
18541849 /**
18551850 * Returns true if this value is a WeakSet.
1856- * This is an experimental feature.
18571851 */
18581852 bool IsWeakSet() const;
18591853
@@ -2950,6 +2944,46 @@ class V8_EXPORT Array : public Object {
29502944};
29512945
29522946
2947+ /**
2948+ * An instance of the built-in Map constructor (ECMA-262, 6th Edition, 23.1.1).
2949+ */
2950+ class V8_EXPORT Map : public Object {
2951+ public:
2952+ size_t Size() const;
2953+
2954+ /**
2955+ * Creates a new Map.
2956+ */
2957+ static Local<Map> New(Isolate* isolate);
2958+
2959+ V8_INLINE static Map* Cast(Value* obj);
2960+
2961+ private:
2962+ Map();
2963+ static void CheckCast(Value* obj);
2964+ };
2965+
2966+
2967+ /**
2968+ * An instance of the built-in Set constructor (ECMA-262, 6th Edition, 23.2.1).
2969+ */
2970+ class V8_EXPORT Set : public Object {
2971+ public:
2972+ size_t Size() const;
2973+
2974+ /**
2975+ * Creates a new Set.
2976+ */
2977+ static Local<Set> New(Isolate* isolate);
2978+
2979+ V8_INLINE static Set* Cast(Value* obj);
2980+
2981+ private:
2982+ Set();
2983+ static void CheckCast(Value* obj);
2984+ };
2985+
2986+
29532987template<typename T>
29542988class ReturnValue {
29552989 public:
@@ -7782,6 +7816,22 @@ Array* Array::Cast(v8::Value* value) {
77827816}
77837817
77847818
7819+ Map* Map::Cast(v8::Value* value) {
7820+ #ifdef V8_ENABLE_CHECKS
7821+ CheckCast(value);
7822+ #endif
7823+ return static_cast<Map*>(value);
7824+ }
7825+
7826+
7827+ Set* Set::Cast(v8::Value* value) {
7828+ #ifdef V8_ENABLE_CHECKS
7829+ CheckCast(value);
7830+ #endif
7831+ return static_cast<Set*>(value);
7832+ }
7833+
7834+
77857835Promise* Promise::Cast(v8::Value* value) {
77867836#ifdef V8_ENABLE_CHECKS
77877837 CheckCast(value);
0 commit comments