Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: src/runtime/runtime-forin.cc

Issue 2059173002: Reland of place all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/runtime/runtime-literals.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/runtime/runtime-literals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698