Skip to content

Commit

Permalink
Version 4.4.63.3 (cherry-pick)
Browse files Browse the repository at this point in the history
Merged 7b24219

Fix lookup iterator checks in GetRealNamedProperty* methods

BUG=v8:4143
LOG=N
R=hablich@chromium.org
TBR=hablich@chromium.org

Review URL: https://codereview.chromium.org/1161953002

Cr-Commit-Position: refs/branch-heads/4.4@{crosswalk-project#7}
Cr-Branched-From: 2e4c550-refs/heads/4.4.63@{#1}
Cr-Branched-From: 0208b8e-refs/heads/master@{#28333}
  • Loading branch information
jeisinger committed May 28, 2015
1 parent 98f000d commit f9cf6a2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4034,10 +4034,10 @@ MaybeLocal<Value> v8::Object::GetRealNamedPropertyInPrototypeChain(
auto proto = i::PrototypeIterator::GetCurrent(iter);
i::LookupIterator it(self, key_obj, i::Handle<i::JSReceiver>::cast(proto),
i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
if (!it.IsFound()) return MaybeLocal<Value>();
Local<Value> result;
has_pending_exception = !ToLocal<Value>(i::Object::GetProperty(&it), &result);
RETURN_ON_FAILED_EXECUTION(Value);
if (!it.IsFound()) return MaybeLocal<Value>();
RETURN_ESCAPED(result);
}

Expand All @@ -4063,9 +4063,9 @@ v8::Object::GetRealNamedPropertyAttributesInPrototypeChain(
auto proto = i::PrototypeIterator::GetCurrent(iter);
i::LookupIterator it(self, key_obj, i::Handle<i::JSReceiver>::cast(proto),
i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
if (!it.IsFound()) return Nothing<PropertyAttribute>();
auto 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));
}
Expand All @@ -4083,16 +4083,15 @@ v8::Object::GetRealNamedPropertyAttributesInPrototypeChain(Handle<String> key) {

MaybeLocal<Value> v8::Object::GetRealNamedProperty(Local<Context> context,
Local<Name> key) {
PREPARE_FOR_EXECUTION(
context, "v8::Object::GetRealNamedPropertyInPrototypeChain()", Value);
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);
if (!it.IsFound()) return MaybeLocal<Value>();
Local<Value> result;
has_pending_exception = !ToLocal<Value>(i::Object::GetProperty(&it), &result);
RETURN_ON_FAILED_EXECUTION(Value);
if (!it.IsFound()) return MaybeLocal<Value>();
RETURN_ESCAPED(result);
}

Expand All @@ -4112,9 +4111,9 @@ Maybe<PropertyAttribute> v8::Object::GetRealNamedPropertyAttributes(
auto key_obj = Utils::OpenHandle(*key);
i::LookupIterator it(self, key_obj,
i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
if (!it.IsFound()) return Nothing<PropertyAttribute>();
auto 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));
}
Expand Down

0 comments on commit f9cf6a2

Please sign in to comment.