Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index fd17edfc568cc16e1f20595c0f96f8d2ba32bd90..30dc9cc402b437e160faefde19fcdb90ced6e299 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -1306,10 +1306,12 @@ void ObjectTemplate::SetAccessor(v8::Handle<Name> name, |
template <typename Getter, typename Setter, typename Query, typename Deleter, |
typename Enumerator> |
-static void ObjectTemplateSetNamedPropertyHandler( |
- ObjectTemplate* templ, Getter getter, Setter setter, Query query, |
- Deleter remover, Enumerator enumerator, Handle<Value> data, |
- bool can_intercept_symbols, PropertyHandlerFlags flags) { |
+static void ObjectTemplateSetNamedPropertyHandler(ObjectTemplate* templ, |
+ Getter getter, Setter setter, |
+ Query query, Deleter remover, |
+ Enumerator enumerator, |
+ Handle<Value> data, |
+ PropertyHandlerFlags flags) { |
i::Isolate* isolate = Utils::OpenHandle(templ)->GetIsolate(); |
ENTER_V8(isolate); |
i::HandleScope scope(isolate); |
@@ -1324,9 +1326,13 @@ static void ObjectTemplateSetNamedPropertyHandler( |
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(can_intercept_symbols); |
+ obj->set_can_intercept_symbols( |
+ !(static_cast<int>(flags) & |
+ static_cast<int>(PropertyHandlerFlags::kOnlyInterceptStrings))); |
obj->set_all_can_read(static_cast<int>(flags) & |
static_cast<int>(PropertyHandlerFlags::kAllCanRead)); |
+ obj->set_non_masking(static_cast<int>(flags) & |
+ static_cast<int>(PropertyHandlerFlags::kNonMasking)); |
if (data.IsEmpty()) { |
data = v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate)); |
@@ -1340,9 +1346,9 @@ void ObjectTemplate::SetNamedPropertyHandler( |
NamedPropertyGetterCallback getter, NamedPropertySetterCallback setter, |
NamedPropertyQueryCallback query, NamedPropertyDeleterCallback remover, |
NamedPropertyEnumeratorCallback enumerator, Handle<Value> data) { |
- ObjectTemplateSetNamedPropertyHandler(this, getter, setter, query, remover, |
- enumerator, data, false, |
- PropertyHandlerFlags::kNone); |
+ ObjectTemplateSetNamedPropertyHandler( |
+ this, getter, setter, query, remover, enumerator, data, |
+ PropertyHandlerFlags::kOnlyInterceptStrings); |
} |
@@ -1350,7 +1356,7 @@ void ObjectTemplate::SetHandler( |
const NamedPropertyHandlerConfiguration& config) { |
ObjectTemplateSetNamedPropertyHandler( |
this, config.getter, config.setter, config.query, config.deleter, |
- config.enumerator, config.data, true, config.flags); |
+ config.enumerator, config.data, config.flags); |
} |