Reviewers: Hablich,
Description:
Version 4.4.63.3 (cherry-pick)
Merged 7b24219346fbfdf2ca795ab6cb370676bf148cb9
Fix lookup iterator checks in GetRealNamedProperty* methods
BUG=v8:4143
LOG=N
[email protected]
Please review this at https://codereview.chromium.org/1161953002/
Base URL: https://chromium.googlesource.com/v8/[email protected]
Affected files (+6, -7 lines):
M include/v8-version.h
M src/api.cc
Index: include/v8-version.h
diff --git a/include/v8-version.h b/include/v8-version.h
index
201d24ba8e0773d3840acb04c71d684c0ef0a72c..c620285f987e05fc41618efdb5821ad6604f61d9
100644
--- a/include/v8-version.h
+++ b/include/v8-version.h
@@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 4
#define V8_MINOR_VERSION 4
#define V8_BUILD_NUMBER 63
-#define V8_PATCH_LEVEL 2
+#define V8_PATCH_LEVEL 3
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index
4f16120df33ddbb4d096c4a3a33820b911986833..daaaf765e236cf28e4e66cb0fbbd16a3334ca49f
100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -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);
}
@@ -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));
}
@@ -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);
}
@@ -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));
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.