Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 4301775086c73827cc58d9dfdb86102de244baa8..2eddaeaeb57a11b9ed5966172f1ece7b4a98d73d 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -5743,6 +5743,17 @@ MaybeHandle<Object> JSObject::PreventExtensions(Handle<JSObject> object) { |
} |
+bool JSObject::IsExtensible() { |
+ if (IsJSGlobalProxy()) { |
+ PrototypeIterator iter(GetIsolate(), this); |
+ if (iter.IsAtEnd()) return false; |
+ DCHECK(iter.GetCurrent()->IsJSGlobalObject()); |
+ return JSObject::cast(iter.GetCurrent())->map()->is_extensible(); |
+ } |
+ return map()->is_extensible(); |
+} |
+ |
+ |
Handle<SeededNumberDictionary> JSObject::GetNormalizedElementDictionary( |
Handle<JSObject> object) { |
DCHECK(!object->elements()->IsDictionary()); |