diff options
Diffstat (limited to 'deps/v8/src/objects.cc')
-rw-r--r-- | deps/v8/src/objects.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/deps/v8/src/objects.cc b/deps/v8/src/objects.cc index 4e20959a7a..aabb0413a4 100644 --- a/deps/v8/src/objects.cc +++ b/deps/v8/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()); |