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

Unified Diff: src/runtime/runtime-function.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, 3 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 side-by-side diff with in-line comments
Download patch
Index: src/runtime/runtime-function.cc
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc
index 6585b4f06349e5e9a99f85a2f49e02a2dc15e3a1..560016659d6a6cf9998f7b2fd088a365f5eb415e 100644
--- a/src/runtime/runtime-function.cc
+++ b/src/runtime/runtime-function.cc
@@ -494,16 +494,9 @@ RUNTIME_FUNCTION(Runtime_NewObjectFromBound) {
bound_args->get(JSFunction::kBoundArgumentsStartIndex + i), isolate);
}
- if (!bound_function->IsJSFunction()) {
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, bound_function,
- Execution::GetConstructorDelegate(isolate, bound_function));
- }
- DCHECK(bound_function->IsJSFunction());
-
Handle<Object> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, result, Execution::New(Handle<JSFunction>::cast(bound_function),
+ isolate, result, Execution::New(isolate, bound_function, bound_function,
total_argc, param_data.get()));
return *result;
}
@@ -564,30 +557,6 @@ RUNTIME_FUNCTION(Runtime_Apply) {
}
-RUNTIME_FUNCTION(Runtime_GetFunctionDelegate) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 1);
- CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
- RUNTIME_ASSERT(!object->IsJSFunction());
- Handle<JSFunction> result;
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, result, Execution::GetFunctionDelegate(isolate, object));
- return *result;
-}
-
-
-RUNTIME_FUNCTION(Runtime_GetConstructorDelegate) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 1);
- CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
- RUNTIME_ASSERT(!object->IsJSFunction());
- Handle<JSFunction> result;
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, result, Execution::GetConstructorDelegate(isolate, object));
- return *result;
-}
-
-
RUNTIME_FUNCTION(Runtime_GetOriginalConstructor) {
SealHandleScope shs(isolate);
DCHECK(args.length() == 0);

Powered by Google App Engine
This is Rietveld 408576698