Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index 7dc41009994161cc4ffeb0633a651ea84233dfc4..acd9a6312f75e7df12e29b82453602ec6c618546 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -379,8 +379,7 @@ static Handle<JSFunction> InstallFunction(Handle<JSObject> target, |
} else { |
attributes = DONT_ENUM; |
} |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- target, internalized_name, function, attributes).Check(); |
+ JSObject::InitializeProperty(target, internalized_name, function, attributes); |
if (target->IsJSGlobalObject()) { |
function->shared()->set_instance_class_name(*internalized_name); |
} |
@@ -889,9 +888,8 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global, |
Heap* heap = isolate->heap(); |
Handle<String> object_name = factory->Object_string(); |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- inner_global, object_name, |
- isolate->object_function(), DONT_ENUM).Check(); |
+ JSObject::InitializeProperty( |
+ inner_global, object_name, isolate->object_function(), DONT_ENUM); |
Handle<JSObject> global(native_context()->global_object()); |
@@ -1090,8 +1088,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global, |
cons->SetInstanceClassName(*name); |
Handle<JSObject> json_object = factory->NewJSObject(cons, TENURED); |
ASSERT(json_object->IsJSObject()); |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- global, name, json_object, DONT_ENUM).Check(); |
+ JSObject::InitializeProperty(global, name, json_object, DONT_ENUM); |
native_context()->set_json_object(*json_object); |
} |
@@ -1156,14 +1153,14 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global, |
native_context()->set_sloppy_arguments_boilerplate(*result); |
// Note: length must be added as the first property and |
// callee must be added as the second property. |
- JSObject::SetOwnPropertyIgnoreAttributes( |
+ JSObject::InitializeProperty( |
result, factory->length_string(), |
factory->undefined_value(), DONT_ENUM, |
- Object::FORCE_TAGGED, FORCE_FIELD).Check(); |
- JSObject::SetOwnPropertyIgnoreAttributes( |
+ Object::FORCE_TAGGED, FORCE_FIELD); |
+ JSObject::InitializeProperty( |
result, factory->callee_string(), |
factory->undefined_value(), DONT_ENUM, |
- Object::FORCE_TAGGED, FORCE_FIELD).Check(); |
+ Object::FORCE_TAGGED, FORCE_FIELD); |
#ifdef DEBUG |
LookupResult lookup(isolate); |
@@ -1262,11 +1259,6 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global, |
Handle<JSObject> result = factory->NewJSObjectFromMap(map); |
native_context()->set_strict_arguments_boilerplate(*result); |
- // Add length property only for strict mode boilerplate. |
- JSObject::SetOwnPropertyIgnoreAttributes( |
rossberg
2014/06/27 10:51:02
Hm, why can this call just be dropped?
Toon Verwaest
2014/06/30 11:39:38
Because NewJSObjectFromMap properly initializes al
|
- result, factory->length_string(), |
- factory->undefined_value(), DONT_ENUM).Check(); |
- |
#ifdef DEBUG |
LookupResult lookup(isolate); |
result->LookupOwn(factory->length_string(), &lookup); |
@@ -1736,12 +1728,10 @@ bool Genesis::InstallNatives() { |
Handle<String> global_string = |
factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("global")); |
Handle<Object> global_obj(native_context()->global_object(), isolate()); |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- builtins, global_string, global_obj, attributes).Check(); |
+ JSObject::InitializeProperty(builtins, global_string, global_obj, attributes); |
Handle<String> builtins_string = |
factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("builtins")); |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- builtins, builtins_string, builtins, attributes).Check(); |
+ JSObject::InitializeProperty(builtins, builtins_string, builtins, attributes); |
// Set up the reference from the global object to the builtins object. |
JSGlobalObject::cast(native_context()->global_object())-> |
@@ -2453,16 +2443,14 @@ void Genesis::TransferNamedProperties(Handle<JSObject> from, |
ASSERT(!descs->GetDetails(i).representation().IsDouble()); |
Handle<Object> value = Handle<Object>(from->RawFastPropertyAt(index), |
isolate()); |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- to, key, value, details.attributes()).Check(); |
+ JSObject::InitializeProperty(to, key, value, details.attributes()); |
break; |
} |
case CONSTANT: { |
HandleScope inner(isolate()); |
Handle<Name> key = Handle<Name>(descs->GetKey(i)); |
Handle<Object> constant(descs->GetConstant(i), isolate()); |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- to, key, constant, details.attributes()).Check(); |
+ JSObject::InitializeProperty(to, key, constant, details.attributes()); |
break; |
} |
case CALLBACKS: { |
@@ -2512,8 +2500,7 @@ void Genesis::TransferNamedProperties(Handle<JSObject> from, |
isolate()); |
} |
PropertyDetails details = properties->DetailsAt(i); |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- to, key, value, details.attributes()).Check(); |
+ JSObject::InitializeProperty(to, key, value, details.attributes()); |
} |
} |
} |