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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 CONVERT_ARG_HANDLE_CHECKED(JSFunction, super_constructor, 1); | 513 CONVERT_ARG_HANDLE_CHECKED(JSFunction, super_constructor, 1); |
514 JavaScriptFrameIterator it(isolate); | 514 JavaScriptFrameIterator it(isolate); |
515 | 515 |
516 // Determine the actual arguments passed to the function. | 516 // Determine the actual arguments passed to the function. |
517 int argument_count = 0; | 517 int argument_count = 0; |
518 base::SmartArrayPointer<Handle<Object>> arguments = | 518 base::SmartArrayPointer<Handle<Object>> arguments = |
519 Runtime::GetCallerArguments(isolate, 0, &argument_count); | 519 Runtime::GetCallerArguments(isolate, 0, &argument_count); |
520 | 520 |
521 Handle<Object> result; | 521 Handle<Object> result; |
522 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 522 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
523 isolate, result, Execution::New(super_constructor, original_constructor, | 523 isolate, result, |
524 argument_count, arguments.get())); | 524 Execution::New(isolate, super_constructor, original_constructor, |
| 525 argument_count, arguments.get())); |
525 | 526 |
526 return *result; | 527 return *result; |
527 } | 528 } |
528 | 529 |
529 } // namespace internal | 530 } // namespace internal |
530 } // namespace v8 | 531 } // namespace v8 |
OLD | NEW |