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

Unified Diff: src/runtime/runtime-function.cc

Issue 1316933002: [es6] Initial steps towards a correct implementation of IsCallable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase again. 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
« no previous file with comments | « src/runtime/runtime-classes.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-function.cc
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc
index d92d13ec1b6228f42d88f8f322c61d0a67d6684f..a00ca4b73a7728436145eedee8c9c7ff6170f29b 100644
--- a/src/runtime/runtime-function.cc
+++ b/src/runtime/runtime-function.cc
@@ -22,10 +22,10 @@ RUNTIME_FUNCTION(Runtime_IsSloppyModeFunction) {
CONVERT_ARG_CHECKED(JSReceiver, callable, 0);
if (!callable->IsJSFunction()) {
HandleScope scope(isolate);
- Handle<Object> delegate;
+ Handle<JSFunction> delegate;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, delegate, Execution::TryGetFunctionDelegate(
- isolate, Handle<JSReceiver>(callable)));
+ isolate, delegate,
+ Execution::GetFunctionDelegate(isolate, Handle<JSReceiver>(callable)));
callable = JSFunction::cast(*delegate);
}
JSFunction* function = JSFunction::cast(callable);
@@ -515,7 +515,7 @@ RUNTIME_FUNCTION(Runtime_NewObjectFromBound) {
if (!bound_function->IsJSFunction()) {
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, bound_function,
- Execution::TryGetConstructorDelegate(isolate, bound_function));
+ Execution::GetConstructorDelegate(isolate, bound_function));
}
DCHECK(bound_function->IsJSFunction());
@@ -602,7 +602,10 @@ RUNTIME_FUNCTION(Runtime_GetFunctionDelegate) {
DCHECK(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
RUNTIME_ASSERT(!object->IsJSFunction());
- return *Execution::GetFunctionDelegate(isolate, object);
+ Handle<JSFunction> result;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, result, Execution::GetFunctionDelegate(isolate, object));
+ return *result;
}
@@ -611,7 +614,10 @@ RUNTIME_FUNCTION(Runtime_GetConstructorDelegate) {
DCHECK(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
RUNTIME_ASSERT(!object->IsJSFunction());
- return *Execution::GetConstructorDelegate(isolate, object);
+ Handle<JSFunction> result;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, result, Execution::GetConstructorDelegate(isolate, object));
+ return *result;
}
« no previous file with comments | « src/runtime/runtime-classes.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698