Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 3f7d92f65d85c19893f74869d6e5e5a67bb93772..1aa60af4f88a570eb35796d10c25e2f3a2164276 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -2013,19 +2013,25 @@ PropertyAttributes JSObject::GetPropertyAttributeWithInterceptor( |
CustomArguments args(interceptor->data(), receiver, this); |
v8::AccessorInfo info(args.end()); |
if (!interceptor->query()->IsUndefined()) { |
- v8::NamedPropertyQuery query = |
- v8::ToCData<v8::NamedPropertyQuery>(interceptor->query()); |
+ v8::NamedPropertyQueryImpl query = |
+ v8::ToCData<v8::NamedPropertyQueryImpl>(interceptor->query()); |
LOG(ApiNamedPropertyAccess("interceptor-named-has", *holder_handle, name)); |
- v8::Handle<v8::Boolean> result; |
+ v8::Handle<v8::Value> result; |
{ |
// Leaving JavaScript. |
VMState state(EXTERNAL); |
result = query(v8::Utils::ToLocal(name_handle), info); |
} |
if (!result.IsEmpty()) { |
- // Convert the boolean result to a property attribute |
- // specification. |
- return result->IsTrue() ? NONE : ABSENT; |
+ // Temporary complicated logic, would be removed soon. |
+ if (result->IsBoolean()) { |
+ // Convert the boolean result to a property attribute |
+ // specification. |
+ return result->IsTrue() ? NONE : ABSENT; |
+ } else { |
+ ASSERT(result->IsInt32()); |
+ return static_cast<PropertyAttributes>(result->Int32Value()); |
+ } |
} |
} else if (!interceptor->getter()->IsUndefined()) { |
v8::NamedPropertyGetter getter = |