OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/elements.h" | 8 #include "src/elements.h" |
9 #include "src/factory.h" | 9 #include "src/factory.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 case LookupIterator::JSPROXY: { | 57 case LookupIterator::JSPROXY: { |
58 // For proxies we have to invoke the [[GetOwnProperty]] trap. | 58 // For proxies we have to invoke the [[GetOwnProperty]] trap. |
59 result = JSProxy::GetPropertyAttributes(&it); | 59 result = JSProxy::GetPropertyAttributes(&it); |
60 if (result.IsNothing()) return MaybeHandle<Object>(); | 60 if (result.IsNothing()) return MaybeHandle<Object>(); |
61 if (result.FromJust() == ABSENT) { | 61 if (result.FromJust() == ABSENT) { |
62 // Continue lookup on the proxy's prototype. | 62 // Continue lookup on the proxy's prototype. |
63 Handle<JSProxy> proxy = it.GetHolder<JSProxy>(); | 63 Handle<JSProxy> proxy = it.GetHolder<JSProxy>(); |
64 Handle<Object> prototype; | 64 Handle<Object> prototype; |
65 ASSIGN_RETURN_ON_EXCEPTION(isolate, prototype, | 65 ASSIGN_RETURN_ON_EXCEPTION(isolate, prototype, |
66 JSProxy::GetPrototype(proxy), Object); | 66 JSProxy::GetPrototype(proxy), Object); |
67 if (prototype->IsNull()) break; | 67 if (prototype->IsNull(isolate)) break; |
68 // We already have a stack-check in JSProxy::GetPrototype. | 68 // We already have a stack-check in JSProxy::GetPrototype. |
69 return HasEnumerableProperty( | 69 return HasEnumerableProperty( |
70 isolate, Handle<JSReceiver>::cast(prototype), key); | 70 isolate, Handle<JSReceiver>::cast(prototype), key); |
71 } else if (result.FromJust() & DONT_ENUM) { | 71 } else if (result.FromJust() & DONT_ENUM) { |
72 return isolate->factory()->undefined_value(); | 72 return isolate->factory()->undefined_value(); |
73 } else { | 73 } else { |
74 return it.GetName(); | 74 return it.GetName(); |
75 } | 75 } |
76 } | 76 } |
77 case LookupIterator::INTERCEPTOR: { | 77 case LookupIterator::INTERCEPTOR: { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 SealHandleScope scope(isolate); | 184 SealHandleScope scope(isolate); |
185 DCHECK_EQ(1, args.length()); | 185 DCHECK_EQ(1, args.length()); |
186 CONVERT_SMI_ARG_CHECKED(index, 0); | 186 CONVERT_SMI_ARG_CHECKED(index, 0); |
187 DCHECK_LE(0, index); | 187 DCHECK_LE(0, index); |
188 DCHECK_LT(index, Smi::kMaxValue); | 188 DCHECK_LT(index, Smi::kMaxValue); |
189 return Smi::FromInt(index + 1); | 189 return Smi::FromInt(index + 1); |
190 } | 190 } |
191 | 191 |
192 } // namespace internal | 192 } // namespace internal |
193 } // namespace v8 | 193 } // namespace v8 |
OLD | NEW |