| Index: src/api-natives.cc
|
| diff --git a/src/api-natives.cc b/src/api-natives.cc
|
| index ea2cce5c889cf400a0d195ffde69d8fb5d7d3ffa..a620b210a4b65156560b3788d3fa3ce8322d3ccb 100644
|
| --- a/src/api-natives.cc
|
| +++ b/src/api-natives.cc
|
| @@ -533,24 +533,22 @@ MaybeHandle<JSObject> ApiNatives::InstantiateRemoteObject(
|
| void ApiNatives::AddDataProperty(Isolate* isolate, Handle<TemplateInfo> info,
|
| Handle<Name> name, Handle<Object> value,
|
| PropertyAttributes attributes) {
|
| - const int kSize = 3;
|
| PropertyDetails details(attributes, DATA, 0, PropertyCellType::kNoCell);
|
| auto details_handle = handle(details.AsSmi(), isolate);
|
| - Handle<Object> data[kSize] = {name, details_handle, value};
|
| - AddPropertyToPropertyList(isolate, info, kSize, data);
|
| + Handle<Object> data[] = {name, details_handle, value};
|
| + AddPropertyToPropertyList(isolate, info, arraysize(data), data);
|
| }
|
|
|
|
|
| void ApiNatives::AddDataProperty(Isolate* isolate, Handle<TemplateInfo> info,
|
| Handle<Name> name, v8::Intrinsic intrinsic,
|
| PropertyAttributes attributes) {
|
| - const int kSize = 4;
|
| auto value = handle(Smi::FromInt(intrinsic), isolate);
|
| auto intrinsic_marker = isolate->factory()->true_value();
|
| PropertyDetails details(attributes, DATA, 0, PropertyCellType::kNoCell);
|
| auto details_handle = handle(details.AsSmi(), isolate);
|
| - Handle<Object> data[kSize] = {name, intrinsic_marker, details_handle, value};
|
| - AddPropertyToPropertyList(isolate, info, kSize, data);
|
| + Handle<Object> data[] = {name, intrinsic_marker, details_handle, value};
|
| + AddPropertyToPropertyList(isolate, info, arraysize(data), data);
|
| }
|
|
|
|
|
| @@ -560,11 +558,10 @@ void ApiNatives::AddAccessorProperty(Isolate* isolate,
|
| Handle<FunctionTemplateInfo> getter,
|
| Handle<FunctionTemplateInfo> setter,
|
| PropertyAttributes attributes) {
|
| - const int kSize = 4;
|
| PropertyDetails details(attributes, ACCESSOR, 0, PropertyCellType::kNoCell);
|
| auto details_handle = handle(details.AsSmi(), isolate);
|
| - Handle<Object> data[kSize] = {name, details_handle, getter, setter};
|
| - AddPropertyToPropertyList(isolate, info, kSize, data);
|
| + Handle<Object> data[] = {name, details_handle, getter, setter};
|
| + AddPropertyToPropertyList(isolate, info, arraysize(data), data);
|
| }
|
|
|
|
|
|
|