| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 289f7d92336ba39e952fe188689764e182b1b812..393e2e29b4007b9ffbb3f9aaeadaf6aca45af793 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -3747,6 +3747,7 @@ Local<Object> v8::Object::FindInstanceInPrototypeChain(
|
| return Local<Object>();
|
| }
|
| }
|
| + // IsTemplateFor() ensures that iter.GetCurrent() can't be a Proxy here.
|
| return Utils::ToLocal(i::handle(iter.GetCurrent<i::JSObject>(), isolate));
|
| }
|
|
|
| @@ -4125,13 +4126,14 @@ MaybeLocal<Value> v8::Object::GetRealNamedPropertyInPrototypeChain(
|
| Local<Context> context, Local<Name> key) {
|
| PREPARE_FOR_EXECUTION(
|
| context, "v8::Object::GetRealNamedPropertyInPrototypeChain()", Value);
|
| - auto self = Utils::OpenHandle(this);
|
| - auto key_obj = Utils::OpenHandle(*key);
|
| + i::Handle<i::JSObject> self = Utils::OpenHandle(this);
|
| + i::Handle<i::Name> key_obj = Utils::OpenHandle(*key);
|
| i::PrototypeIterator iter(isolate, self);
|
| if (iter.IsAtEnd()) return MaybeLocal<Value>();
|
| - auto proto = i::PrototypeIterator::GetCurrent(iter);
|
| + i::Handle<i::JSReceiver> proto =
|
| + i::PrototypeIterator::GetCurrent<i::JSReceiver>(iter);
|
| i::LookupIterator it = i::LookupIterator::PropertyOrElement(
|
| - isolate, self, key_obj, i::Handle<i::JSReceiver>::cast(proto),
|
| + isolate, self, key_obj, proto,
|
| i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
|
| Local<Value> result;
|
| has_pending_exception = !ToLocal<Value>(i::Object::GetProperty(&it), &result);
|
| @@ -4155,22 +4157,20 @@ v8::Object::GetRealNamedPropertyAttributesInPrototypeChain(
|
| PREPARE_FOR_EXECUTION_PRIMITIVE(
|
| context, "v8::Object::GetRealNamedPropertyAttributesInPrototypeChain()",
|
| PropertyAttribute);
|
| - auto self = Utils::OpenHandle(this);
|
| - auto key_obj = Utils::OpenHandle(*key);
|
| + i::Handle<i::JSObject> self = Utils::OpenHandle(this);
|
| + i::Handle<i::Name> key_obj = Utils::OpenHandle(*key);
|
| i::PrototypeIterator iter(isolate, self);
|
| if (iter.IsAtEnd()) return Nothing<PropertyAttribute>();
|
| - auto proto = i::PrototypeIterator::GetCurrent(iter);
|
| + i::Handle<i::JSReceiver> proto =
|
| + i::PrototypeIterator::GetCurrent<i::JSReceiver>(iter);
|
| i::LookupIterator it = i::LookupIterator::PropertyOrElement(
|
| - isolate, self, key_obj, i::Handle<i::JSReceiver>::cast(proto),
|
| + isolate, self, key_obj, proto,
|
| i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
|
| - auto result = i::JSReceiver::GetPropertyAttributes(&it);
|
| + Maybe<PropertyAttributes> result = i::JSReceiver::GetPropertyAttributes(&it);
|
| RETURN_ON_FAILED_EXECUTION_PRIMITIVE(PropertyAttribute);
|
| if (!it.IsFound()) return Nothing<PropertyAttribute>();
|
| - if (result.FromJust() == ABSENT) {
|
| - return Just(static_cast<PropertyAttribute>(NONE));
|
| - }
|
| - return Just<PropertyAttribute>(
|
| - static_cast<PropertyAttribute>(result.FromJust()));
|
| + if (result.FromJust() == ABSENT) return Just(None);
|
| + return Just(static_cast<PropertyAttribute>(result.FromJust()));
|
| }
|
|
|
|
|
|
|