Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index 0d1c070e47e36418ee566dd637d97f72a2fcd8ec..2120cdb6e3458d037427085c2397226fb27b71b4 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -1705,18 +1705,21 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object, |
static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY); |
Map::EnsureDescriptorSlack(map, 2); |
+ Handle<AccessorInfo> bound_length = |
+ Accessors::BoundFunctionLengthInfo(isolate, roc_attribs); |
{ // length |
- DataDescriptor d(factory->length_string(), JSBoundFunction::kLengthIndex, |
- roc_attribs, Representation::Tagged()); |
+ AccessorConstantDescriptor d(factory->length_string(), bound_length, |
+ roc_attribs); |
map->AppendDescriptor(&d); |
} |
- { // name |
- DataDescriptor d(factory->name_string(), JSBoundFunction::kNameIndex, |
- roc_attribs, Representation::Tagged()); |
+ Handle<AccessorInfo> bound_name = |
+ Accessors::BoundFunctionNameInfo(isolate, roc_attribs); |
+ { // length |
+ AccessorConstantDescriptor d(factory->name_string(), bound_name, |
+ roc_attribs); |
map->AppendDescriptor(&d); |
} |
- |
- map->SetInObjectProperties(2); |
+ map->SetInObjectProperties(0); |
native_context()->set_bound_function_without_constructor_map(*map); |
map = Map::Copy(map, "IsConstructor"); |