| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <limits> | 6 #include <limits> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 uint32_t index) { | 274 uint32_t index) { |
| 275 if (home_object->IsAccessCheckNeeded() && !isolate->MayAccess(home_object)) { | 275 if (home_object->IsAccessCheckNeeded() && !isolate->MayAccess(home_object)) { |
| 276 isolate->ReportFailedAccessCheck(home_object); | 276 isolate->ReportFailedAccessCheck(home_object); |
| 277 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); | 277 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate); |
| 278 } | 278 } |
| 279 | 279 |
| 280 PrototypeIterator iter(isolate, home_object); | 280 PrototypeIterator iter(isolate, home_object); |
| 281 Handle<Object> proto = PrototypeIterator::GetCurrent(iter); | 281 Handle<Object> proto = PrototypeIterator::GetCurrent(iter); |
| 282 if (!proto->IsJSReceiver()) return isolate->heap()->undefined_value(); | 282 if (!proto->IsJSReceiver()) return isolate->heap()->undefined_value(); |
| 283 | 283 |
| 284 LookupIterator it(isolate, receiver, index, Handle<JSReceiver>::cast(proto)); |
| 284 Handle<Object> result; | 285 Handle<Object> result; |
| 285 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 286 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, Object::GetProperty(&it)); |
| 286 isolate, result, | |
| 287 Object::GetElementWithReceiver(isolate, proto, receiver, index)); | |
| 288 return *result; | 287 return *result; |
| 289 } | 288 } |
| 290 | 289 |
| 291 | 290 |
| 292 RUNTIME_FUNCTION(Runtime_LoadFromSuper) { | 291 RUNTIME_FUNCTION(Runtime_LoadFromSuper) { |
| 293 HandleScope scope(isolate); | 292 HandleScope scope(isolate); |
| 294 DCHECK(args.length() == 3); | 293 DCHECK(args.length() == 3); |
| 295 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); | 294 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); |
| 296 CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); | 295 CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); |
| 297 CONVERT_ARG_HANDLE_CHECKED(Name, name, 2); | 296 CONVERT_ARG_HANDLE_CHECKED(Name, name, 2); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 return nullptr; | 454 return nullptr; |
| 456 } | 455 } |
| 457 | 456 |
| 458 | 457 |
| 459 RUNTIME_FUNCTION(Runtime_CallSuperWithSpread) { | 458 RUNTIME_FUNCTION(Runtime_CallSuperWithSpread) { |
| 460 UNIMPLEMENTED(); | 459 UNIMPLEMENTED(); |
| 461 return nullptr; | 460 return nullptr; |
| 462 } | 461 } |
| 463 } // namespace internal | 462 } // namespace internal |
| 464 } // namespace v8 | 463 } // namespace v8 |
| OLD | NEW |