Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index e9bedcadeb1eff4b9fbd61d29a71a69b1218849c..7e76f3e42e578839127dc3759d3f82e31749afe9 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -4175,6 +4175,28 @@ MaybeHandle<Object> JSObject::SetPropertyForResult( |
} |
+void JSObject::InitializeProperty( |
+ Handle<JSObject> object, |
+ Handle<Name> name, |
+ Handle<Object> value, |
+ PropertyAttributes attributes, |
+ ValueType value_type, |
+ StoreMode store_mode) { |
+#ifdef DEBUG |
+ uint32_t index; |
+ ASSERT(!object->IsJSProxy()); |
+ ASSERT(!name->AsArrayIndex(&index)); |
+ LookupIterator it(object, name, LookupIterator::CHECK_OWN_REAL); |
+ GetPropertyAttributes(&it); |
+ ASSERT(!it.IsFound()); |
+ ASSERT(object->map()->is_extensible()); |
+#endif |
+ SetOwnPropertyIgnoreAttributes( |
+ object, name, value, attributes, value_type, store_mode, |
+ OMIT_EXTENSIBILITY_CHECK).Check(); |
+} |
+ |
+ |
// Set a real own property, even if it is READ_ONLY. If the property is not |
// present, add it with attributes NONE. This code is an exact clone of |
// SetProperty, with the check for IsReadOnly and the check for a |
@@ -5147,13 +5169,8 @@ Handle<ObjectHashTable> JSObject::GetOrCreateHiddenPropertiesHashtable( |
} |
JSObject::SetOwnPropertyIgnoreAttributes( |
- object, |
- isolate->factory()->hidden_string(), |
- hashtable, |
- DONT_ENUM, |
- OPTIMAL_REPRESENTATION, |
- ALLOW_AS_CONSTANT, |
- OMIT_EXTENSIBILITY_CHECK).Assert(); |
+ object, isolate->factory()->hidden_string(), |
+ hashtable, DONT_ENUM).Assert(); |
return hashtable; |
} |