Commit 2698ad44 authored by Camillo Bruni's avatar Camillo Bruni Committed by V8 LUCI CQ

[runtime] Dehandlify MakeAccessor

Change-Id: Ifa0b6419484aea82f575db6ef8863c318cfabfe6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865152Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82821}
parent fa692854
......@@ -28,19 +28,23 @@ Handle<AccessorInfo> Accessors::MakeAccessor(
Isolate* isolate, Handle<Name> name, AccessorNameGetterCallback getter,
AccessorNameBooleanSetterCallback setter) {
Factory* factory = isolate->factory();
Handle<AccessorInfo> info = factory->NewAccessorInfo();
info->set_all_can_read(false);
info->set_all_can_write(false);
info->set_is_special_data_property(true);
info->set_is_sloppy(false);
info->set_replace_on_access(false);
info->set_getter_side_effect_type(SideEffectType::kHasSideEffect);
info->set_setter_side_effect_type(SideEffectType::kHasSideEffect);
name = factory->InternalizeName(name);
info->set_name(*name);
info->set_getter(isolate, reinterpret_cast<Address>(getter));
if (setter == nullptr) setter = &ReconfigureToDataProperty;
info->set_setter(isolate, reinterpret_cast<Address>(setter));
Handle<AccessorInfo> info = factory->NewAccessorInfo();
{
DisallowGarbageCollection no_gc;
auto raw = *info;
raw.set_all_can_read(false);
raw.set_all_can_write(false);
raw.set_is_special_data_property(true);
raw.set_is_sloppy(false);
raw.set_replace_on_access(false);
raw.set_getter_side_effect_type(SideEffectType::kHasSideEffect);
raw.set_setter_side_effect_type(SideEffectType::kHasSideEffect);
raw.set_name(*name);
raw.set_getter(isolate, reinterpret_cast<Address>(getter));
if (setter == nullptr) setter = &ReconfigureToDataProperty;
raw.set_setter(isolate, reinterpret_cast<Address>(setter));
}
return info;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment