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