Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index f2c21ac4bd6dc157dec41203fa8de6aee7a1611b..2f55d71e725c3f63f0630e2a89c2381cef858f19 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -905,6 +905,9 @@ bool Object::IsNameDictionary() const { |
} |
+bool Object::IsGlobalDictionary() const { return IsDictionary(); } |
+ |
+ |
bool Object::IsSeededNumberDictionary() const { |
return IsDictionary(); |
} |
@@ -3382,6 +3385,7 @@ CAST_ACCESSOR(FixedArrayBase) |
CAST_ACCESSOR(FixedDoubleArray) |
CAST_ACCESSOR(FixedTypedArrayBase) |
CAST_ACCESSOR(Foreign) |
+CAST_ACCESSOR(GlobalDictionary) |
CAST_ACCESSOR(GlobalObject) |
CAST_ACCESSOR(HandlerTable) |
CAST_ACCESSOR(HeapObject) |
@@ -6731,10 +6735,20 @@ bool JSObject::HasIndexedInterceptor() { |
NameDictionary* JSObject::property_dictionary() { |
DCHECK(!HasFastProperties()); |
+ // TODO(ishell): Uncomment, once all property_dictionary() usages for global |
+ // objects are replaced with global_dictionary(). |
+ // DCHECK(!IsGlobalObject()); |
return NameDictionary::cast(properties()); |
} |
+GlobalDictionary* JSObject::global_dictionary() { |
+ DCHECK(!HasFastProperties()); |
+ DCHECK(IsGlobalObject()); |
+ return GlobalDictionary::cast(properties()); |
+} |
+ |
+ |
SeededNumberDictionary* JSObject::element_dictionary() { |
DCHECK(HasDictionaryElements()); |
return SeededNumberDictionary::cast(elements()); |