Chromium Code Reviews| Index: src/lookup.h |
| diff --git a/src/lookup.h b/src/lookup.h |
| index 923e8107fd3a36c159b4396b458de7962baca666..ba6c597293566c236bb37676e3e85cfb72b3197d 100644 |
| --- a/src/lookup.h |
| +++ b/src/lookup.h |
| @@ -47,7 +47,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED { |
| LookupIterator(Handle<Object> receiver, |
| Handle<Name> name, |
| Configuration configuration = CHECK_ALL) |
| - : configuration_(configuration), |
| + : configuration_(ComputeConfiguration(configuration, name)), |
| state_(NOT_FOUND), |
| property_kind_(DATA), |
| property_encoding_(DESCRIPTOR), |
| @@ -66,7 +66,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED { |
| Handle<Name> name, |
| Handle<JSReceiver> holder, |
| Configuration configuration = CHECK_ALL) |
| - : configuration_(configuration), |
| + : configuration_(ComputeConfiguration(configuration, name)), |
| state_(NOT_FOUND), |
| property_kind_(DATA), |
| property_encoding_(DESCRIPTOR), |
| @@ -187,6 +187,15 @@ class LookupIterator V8_FINAL BASE_EMBEDDED { |
| return number_; |
| } |
| + static Configuration ComputeConfiguration( |
| + Configuration configuration, Handle<Name> name) { |
| + if (name->IsOwn()) { |
| + return static_cast<Configuration>(configuration && CHECK_OWN); |
|
Dmitry Lomov (no reviews)
2014/08/11 16:06:41
Oh noes this '&&' is wrong of course :)
|
| + } else { |
| + return configuration; |
| + } |
| + } |
| + |
| Configuration configuration_; |
| State state_; |
| bool has_property_; |