Commit a4b7d45c authored by verwaest's avatar verwaest Committed by Commit bot

Handlify ExecutableAccessorInfo::ClearSetter since it allocates.

BUG=chromium:478556
LOG=n

Review URL: https://codereview.chromium.org/1107853002

Cr-Commit-Position: refs/heads/master@{#28065}
parent a65ef0d5
......@@ -7059,11 +7059,12 @@ bool AccessorInfo::IsCompatibleReceiver(Object* receiver) {
}
void ExecutableAccessorInfo::clear_setter() {
auto foreign = GetIsolate()->factory()->NewForeign(
// static
void ExecutableAccessorInfo::ClearSetter(Handle<ExecutableAccessorInfo> info) {
auto foreign = info->GetIsolate()->factory()->NewForeign(
reinterpret_cast<v8::internal::Address>(
reinterpret_cast<intptr_t>(nullptr)));
set_setter(*foreign);
info->set_setter(*foreign);
}
......
......@@ -4247,7 +4247,9 @@ MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
// By clearing the setter we don't have to introduce a lookup to
// the setter, simply make it unavailable to reflect the
// attributes.
if (attributes & READ_ONLY) new_data->clear_setter();
if (attributes & READ_ONLY) {
ExecutableAccessorInfo::ClearSetter(new_data);
}
SetPropertyCallback(object, name, new_data, attributes);
if (is_observed) {
RETURN_ON_EXCEPTION(
......
......@@ -10563,7 +10563,7 @@ class ExecutableAccessorInfo: public AccessorInfo {
static const int kDataOffset = kSetterOffset + kPointerSize;
static const int kSize = kDataOffset + kPointerSize;
inline void clear_setter();
static inline void ClearSetter(Handle<ExecutableAccessorInfo> info);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(ExecutableAccessorInfo);
......
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