Index: src/runtime/runtime-function.cc |
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc |
index 31cda72874ee10b31cc7dc7dffdd99f91779d561..1d0668eec185d7b093f9008aa229d939cba33e1b 100644 |
--- a/src/runtime/runtime-function.cc |
+++ b/src/runtime/runtime-function.cc |
@@ -21,10 +21,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); |
@@ -514,7 +514,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()); |
@@ -601,7 +601,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; |
} |
@@ -610,7 +613,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; |
} |