BUG=chromium:478556
LOG=n
Review URL: https://codereview.chromium.org/
1107853002
Cr-Commit-Position: refs/heads/master@{#28065}
}
-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);
}
// 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(
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);