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

Unified Diff: test/cctest/test-parsing.cc

Issue 2207923002: Properly handle exceptions in cctests (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | test/fuzzer/regexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index 1c85fc3ccff2be52b6b96c5d64225a0eb40303f1..0045a06fd82200756bfd2d2eb8e6ba5ac14c2fd7 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -1647,6 +1647,7 @@ void TestParserSyncWithFlags(i::Handle<i::String> source,
i::Handle<i::String> message_string = i::Handle<i::String>::cast(
i::JSReceiver::GetProperty(isolate, exception_handle, "message")
.ToHandleChecked());
+ isolate->clear_pending_exception();
if (result == kSuccess) {
v8::base::OS::Print(
@@ -5615,6 +5616,7 @@ TEST(BasicImportExportParsing) {
i::Handle<i::String> message_string = i::Handle<i::String>::cast(
i::JSReceiver::GetProperty(isolate, exception_handle, "message")
.ToHandleChecked());
+ isolate->clear_pending_exception();
v8::base::OS::Print(
"Parser failed on:\n"
@@ -5635,6 +5637,7 @@ TEST(BasicImportExportParsing) {
i::Parser parser(&info);
info.set_global();
CHECK(!parser.Parse(&info));
+ isolate->clear_pending_exception();
}
}
}
@@ -5727,6 +5730,7 @@ TEST(ImportExportParsingErrors) {
i::Parser parser(&info);
info.set_module();
CHECK(!parser.Parse(&info));
+ isolate->clear_pending_exception();
}
}
@@ -5764,6 +5768,7 @@ TEST(ModuleTopLevelFunctionDecl) {
i::Parser parser(&info);
info.set_module();
CHECK(!parser.Parse(&info));
+ isolate->clear_pending_exception();
}
}
« no previous file with comments | « no previous file | test/fuzzer/regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698