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

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

Issue 1360793002: [builtins] Refactor Invoke to deal with any kind of callable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698