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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 Runtime::GetCallerArguments(isolate, 0, &argument_count); | 502 Runtime::GetCallerArguments(isolate, 0, &argument_count); |
503 | 503 |
504 Handle<Object> result; | 504 Handle<Object> result; |
505 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 505 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
506 isolate, result, Execution::New(isolate, super_constructor, new_target, | 506 isolate, result, Execution::New(isolate, super_constructor, new_target, |
507 argument_count, arguments.get())); | 507 argument_count, arguments.get())); |
508 | 508 |
509 return *result; | 509 return *result; |
510 } | 510 } |
511 | 511 |
| 512 |
| 513 RUNTIME_FUNCTION(Runtime_GetSuperConstructor) { |
| 514 SealHandleScope shs(isolate); |
| 515 DCHECK_EQ(1, args.length()); |
| 516 CONVERT_ARG_CHECKED(JSFunction, active_function, 0); |
| 517 return active_function->map()->prototype(); |
| 518 } |
| 519 |
512 } // namespace internal | 520 } // namespace internal |
513 } // namespace v8 | 521 } // namespace v8 |
OLD | NEW |