Index: test/cctest/compiler/function-tester.cc |
diff --git a/test/cctest/compiler/function-tester.cc b/test/cctest/compiler/function-tester.cc |
index 4776689995546330287b9e80e0621ffa726ebe87..b3c226491545c8abbf12731ed0767d7ed252f020 100644 |
--- a/test/cctest/compiler/function-tester.cc |
+++ b/test/cctest/compiler/function-tester.cc |
@@ -74,6 +74,15 @@ MaybeHandle<Object> FunctionTester::Call(Handle<Object> a, Handle<Object> b, |
return Execution::Call(isolate, function, undefined(), 4, args); |
} |
+void FunctionTester::CheckThrows(Handle<Object> a) { |
+ TryCatch try_catch(reinterpret_cast<v8::Isolate*>(isolate)); |
+ MaybeHandle<Object> no_result = Call(a); |
+ CHECK(isolate->has_pending_exception()); |
+ CHECK(try_catch.HasCaught()); |
+ CHECK(no_result.is_null()); |
+ isolate->OptionalRescheduleException(true); |
+} |
+ |
void FunctionTester::CheckThrows(Handle<Object> a, Handle<Object> b) { |
TryCatch try_catch(reinterpret_cast<v8::Isolate*>(isolate)); |
MaybeHandle<Object> no_result = Call(a, b); |