OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/lookup.h" | 8 #include "src/lookup.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 return handle(Handle<HeapObject>::cast(receiver)->map()); | 46 return handle(Handle<HeapObject>::cast(receiver)->map()); |
47 } | 47 } |
48 | 48 |
49 | 49 |
50 bool LookupIterator::NextHolder() { | 50 bool LookupIterator::NextHolder() { |
51 if (holder_map_->prototype()->IsNull()) return false; | 51 if (holder_map_->prototype()->IsNull()) return false; |
52 | 52 |
53 Handle<JSReceiver> next(JSReceiver::cast(holder_map_->prototype())); | 53 Handle<JSReceiver> next(JSReceiver::cast(holder_map_->prototype())); |
54 | 54 |
55 if (!check_derived() && | 55 if (!check_derived() && |
56 // TODO(verwaest): Check if this is actually necessary currently. If it | 56 !(check_hidden() && |
57 // is, this should be handled by setting is_hidden_prototype on the | 57 // TODO(verwaest): Check if this is actually necessary currently. If it |
58 // global object behind the proxy. | 58 // is, this should be handled by setting is_hidden_prototype on the |
59 !holder_map_->IsJSGlobalProxyMap() && | 59 // global object behind the proxy. |
60 !next->map()->is_hidden_prototype()) { | 60 (holder_map_->IsJSGlobalProxyMap() || |
| 61 next->map()->is_hidden_prototype()))) { |
61 return false; | 62 return false; |
62 } | 63 } |
63 | 64 |
64 holder_map_ = handle(next->map()); | 65 holder_map_ = handle(next->map()); |
65 maybe_holder_ = next; | 66 maybe_holder_ = next; |
66 return true; | 67 return true; |
67 } | 68 } |
68 | 69 |
69 | 70 |
70 LookupIterator::State LookupIterator::LookupInHolder() { | 71 LookupIterator::State LookupIterator::LookupInHolder() { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 ASSERT_EQ(DICTIONARY, property_encoding_); | 193 ASSERT_EQ(DICTIONARY, property_encoding_); |
193 ASSERT(GetHolder()->IsGlobalObject()); | 194 ASSERT(GetHolder()->IsGlobalObject()); |
194 ASSERT(property_details_.IsReadOnly()); | 195 ASSERT(property_details_.IsReadOnly()); |
195 return factory()->undefined_value(); | 196 return factory()->undefined_value(); |
196 } | 197 } |
197 return value; | 198 return value; |
198 } | 199 } |
199 | 200 |
200 | 201 |
201 } } // namespace v8::internal | 202 } } // namespace v8::internal |
OLD | NEW |