Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 34b7c2e229c457c7212514c3f1856094000c966d..15b0b3ee6c79fb8791ee454ef03f571313acf5ae 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -480,6 +480,12 @@ bool Object::IsJSFunctionProxy() { |
} |
+bool Object::IsJSWeakMap() { |
+ return Object::IsJSObject() && |
+ HeapObject::cast(this)->map()->instance_type() == JS_WEAK_MAP_TYPE; |
+} |
+ |
+ |
bool Object::IsJSContextExtensionObject() { |
return IsHeapObject() |
&& (HeapObject::cast(this)->map()->instance_type() == |
@@ -1414,6 +1420,8 @@ int JSObject::GetHeaderSize() { |
return JSValue::kSize; |
case JS_ARRAY_TYPE: |
return JSValue::kSize; |
+ case JS_WEAK_MAP_TYPE: |
+ return JSWeakMap::kSize; |
case JS_REGEXP_TYPE: |
return JSValue::kSize; |
case JS_CONTEXT_EXTENSION_OBJECT_TYPE: |
@@ -2064,6 +2072,7 @@ CAST_ACCESSOR(JSArray) |
CAST_ACCESSOR(JSRegExp) |
CAST_ACCESSOR(JSProxy) |
CAST_ACCESSOR(JSFunctionProxy) |
+CAST_ACCESSOR(JSWeakMap) |
CAST_ACCESSOR(Foreign) |
CAST_ACCESSOR(ByteArray) |
CAST_ACCESSOR(ExternalArray) |
@@ -3794,6 +3803,9 @@ ACCESSORS(JSProxy, handler, Object, kHandlerOffset) |
ACCESSORS(JSProxy, padding, Object, kPaddingOffset) |
+ACCESSORS(JSWeakMap, table, ObjectHashTable, kTableOffset) |
+ |
+ |
Address Foreign::address() { |
return AddressFrom<Address>(READ_INTPTR_FIELD(this, kAddressOffset)); |
} |