Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: src/api.cc

Issue 1177383004: Also handle elements in *RealNamed* api methods (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 750d7df7ff9f46eb9527d967abb563956c7cfc9b..664b80e38a7d4f7f11f37681a7b362eec2aa3d74 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -4223,8 +4223,9 @@ MaybeLocal<Value> v8::Object::GetRealNamedPropertyInPrototypeChain(
i::PrototypeIterator iter(isolate, self);
if (iter.IsAtEnd()) return MaybeLocal<Value>();
auto proto = i::PrototypeIterator::GetCurrent(iter);
- i::LookupIterator it(self, key_obj, i::Handle<i::JSReceiver>::cast(proto),
- i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
+ i::LookupIterator it = i::LookupIterator::PropertyOrElement(
+ isolate, self, key_obj, i::Handle<i::JSReceiver>::cast(proto),
+ i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
Local<Value> result;
has_pending_exception = !ToLocal<Value>(i::Object::GetProperty(&it), &result);
RETURN_ON_FAILED_EXECUTION(Value);
@@ -4252,8 +4253,9 @@ v8::Object::GetRealNamedPropertyAttributesInPrototypeChain(
i::PrototypeIterator iter(isolate, self);
if (iter.IsAtEnd()) return Nothing<PropertyAttribute>();
auto proto = i::PrototypeIterator::GetCurrent(iter);
- i::LookupIterator it(self, key_obj, i::Handle<i::JSReceiver>::cast(proto),
- i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
+ i::LookupIterator it = i::LookupIterator::PropertyOrElement(
+ isolate, self, key_obj, i::Handle<i::JSReceiver>::cast(proto),
+ i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
auto result = i::JSReceiver::GetPropertyAttributes(&it);
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(PropertyAttribute);
if (!it.IsFound()) return Nothing<PropertyAttribute>();
@@ -4277,8 +4279,9 @@ MaybeLocal<Value> v8::Object::GetRealNamedProperty(Local<Context> context,
PREPARE_FOR_EXECUTION(context, "v8::Object::GetRealNamedProperty()", Value);
auto self = Utils::OpenHandle(this);
auto key_obj = Utils::OpenHandle(*key);
- i::LookupIterator it(self, key_obj,
- i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
+ i::LookupIterator it = i::LookupIterator::PropertyOrElement(
+ isolate, self, key_obj,
+ i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
Local<Value> result;
has_pending_exception = !ToLocal<Value>(i::Object::GetProperty(&it), &result);
RETURN_ON_FAILED_EXECUTION(Value);
@@ -4300,8 +4303,9 @@ Maybe<PropertyAttribute> v8::Object::GetRealNamedPropertyAttributes(
PropertyAttribute);
auto self = Utils::OpenHandle(this);
auto key_obj = Utils::OpenHandle(*key);
- i::LookupIterator it(self, key_obj,
- i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
+ i::LookupIterator it = i::LookupIterator::PropertyOrElement(
+ isolate, self, key_obj,
+ i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
auto result = i::JSReceiver::GetPropertyAttributes(&it);
RETURN_ON_FAILED_EXECUTION_PRIMITIVE(PropertyAttribute);
if (!it.IsFound()) return Nothing<PropertyAttribute>();
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698