Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 1cb00f271fa7d0e9a4c7f0014606eb74535f8438..d1e03b911d096fdd5d8a2f4677288766a81216c5 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -1370,13 +1370,13 @@ static void ObjectTemplateSetNamedPropertyHandler(ObjectTemplate* templ, |
EnsureNotInstantiated(cons, "ObjectTemplateSetNamedPropertyHandler"); |
auto obj = i::Handle<i::InterceptorInfo>::cast( |
isolate->factory()->NewStruct(i::INTERCEPTOR_INFO_TYPE)); |
+ obj->set_flags(0); |
if (getter != 0) SET_FIELD_WRAPPED(obj, set_getter, getter); |
if (setter != 0) SET_FIELD_WRAPPED(obj, set_setter, setter); |
if (query != 0) SET_FIELD_WRAPPED(obj, set_query, query); |
if (remover != 0) SET_FIELD_WRAPPED(obj, set_deleter, remover); |
if (enumerator != 0) SET_FIELD_WRAPPED(obj, set_enumerator, enumerator); |
- obj->set_flags(0); |
obj->set_can_intercept_symbols( |
!(static_cast<int>(flags) & |
static_cast<int>(PropertyHandlerFlags::kOnlyInterceptStrings))); |
@@ -1457,6 +1457,7 @@ void ObjectTemplate::SetHandler( |
EnsureNotInstantiated(cons, "v8::ObjectTemplate::SetHandler"); |
auto obj = i::Handle<i::InterceptorInfo>::cast( |
isolate->factory()->NewStruct(i::INTERCEPTOR_INFO_TYPE)); |
+ obj->set_flags(0); |
if (config.getter != 0) SET_FIELD_WRAPPED(obj, set_getter, config.getter); |
if (config.setter != 0) SET_FIELD_WRAPPED(obj, set_setter, config.setter); |
@@ -1465,7 +1466,6 @@ void ObjectTemplate::SetHandler( |
if (config.enumerator != 0) { |
SET_FIELD_WRAPPED(obj, set_enumerator, config.enumerator); |
} |
- obj->set_flags(0); |
obj->set_all_can_read(static_cast<int>(config.flags) & |
static_cast<int>(PropertyHandlerFlags::kAllCanRead)); |