Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(910)

Unified Diff: src/objects.cc

Issue 1154233003: Introduce v8::Object::CreateDataProperty (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698