Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 6d82325e5b210797ec8087cfcf6f74ec49735bb7..fd4b397d2bf074090a0a4359cbf37b0778b2234f 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -988,11 +988,6 @@ bool Object::ToInt32(int32_t* value) { |
return false; |
} |
-bool FunctionTemplateInfo::IsTemplateFor(JSObject* object) { |
- return IsTemplateFor(object->map()); |
-} |
- |
- |
bool FunctionTemplateInfo::IsTemplateFor(Map* map) { |
// There is a constraint on the object; check. |
if (!map->IsJSObjectMap()) return false; |
@@ -1156,16 +1151,9 @@ MaybeHandle<Object> Object::GetPropertyWithAccessor(LookupIterator* it) { |
// Regular accessor. |
Handle<Object> getter(AccessorPair::cast(*structure)->getter(), isolate); |
if (getter->IsFunctionTemplateInfo()) { |
- auto result = Builtins::InvokeApiFunction( |
- Handle<FunctionTemplateInfo>::cast(getter), receiver, 0, nullptr); |
- if (isolate->has_pending_exception()) { |
- return MaybeHandle<Object>(); |
- } |
- Handle<Object> return_value; |
- if (result.ToHandle(&return_value)) { |
- return_value->VerifyApiCallResultType(); |
- return handle(*return_value, isolate); |
- } |
+ return Builtins::InvokeApiFunction( |
+ isolate, Handle<FunctionTemplateInfo>::cast(getter), receiver, 0, |
+ nullptr); |
} else if (getter->IsCallable()) { |
// TODO(rossberg): nicer would be to cast to some JSCallable here... |
return Object::GetPropertyWithDefinedGetter( |
@@ -1245,12 +1233,11 @@ Maybe<bool> Object::SetPropertyWithAccessor(LookupIterator* it, |
Handle<Object> setter(AccessorPair::cast(*structure)->setter(), isolate); |
if (setter->IsFunctionTemplateInfo()) { |
Handle<Object> argv[] = {value}; |
- auto result = |
- Builtins::InvokeApiFunction(Handle<FunctionTemplateInfo>::cast(setter), |
- receiver, arraysize(argv), argv); |
- if (isolate->has_pending_exception()) { |
- return Nothing<bool>(); |
- } |
+ RETURN_ON_EXCEPTION_VALUE( |
+ isolate, Builtins::InvokeApiFunction( |
+ isolate, Handle<FunctionTemplateInfo>::cast(setter), |
+ receiver, arraysize(argv), argv), |
+ Nothing<bool>()); |
return Just(true); |
} else if (setter->IsCallable()) { |
// TODO(rossberg): nicer would be to cast to some JSCallable here... |