| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 4e20959a7a8c4b7bb6dae90feaba0e8e346865e0..aabb0413a4cb4d60cc1a890e02d8773bc8437fc0 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -5823,16 +5823,24 @@ bool JSObject::HasElementWithInterceptor(JSObject* receiver, uint32_t index) {
|
| CustomArguments args(interceptor->data(), receiver, this);
|
| v8::AccessorInfo info(args.end());
|
| if (!interceptor->query()->IsUndefined()) {
|
| - v8::IndexedPropertyQuery query =
|
| - v8::ToCData<v8::IndexedPropertyQuery>(interceptor->query());
|
| + v8::IndexedPropertyQueryImpl query =
|
| + v8::ToCData<v8::IndexedPropertyQueryImpl>(interceptor->query());
|
| LOG(ApiIndexedPropertyAccess("interceptor-indexed-has", this, index));
|
| - v8::Handle<v8::Boolean> result;
|
| + v8::Handle<v8::Value> result;
|
| {
|
| // Leaving JavaScript.
|
| VMState state(EXTERNAL);
|
| result = query(index, info);
|
| }
|
| - if (!result.IsEmpty()) return result->IsTrue();
|
| + if (!result.IsEmpty()) {
|
| + // IsBoolean check would be removed when transition to new API is over.
|
| + if (result->IsBoolean()) {
|
| + return result->IsTrue() ? true : false;
|
| + } else {
|
| + ASSERT(result->IsInt32());
|
| + return true; // absence of property is signaled by empty handle.
|
| + }
|
| + }
|
| } else if (!interceptor->getter()->IsUndefined()) {
|
| v8::IndexedPropertyGetter getter =
|
| v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter());
|
|
|