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

Unified Diff: test/fuzzer/regexp.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 | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/fuzzer/regexp.cc
diff --git a/test/fuzzer/regexp.cc b/test/fuzzer/regexp.cc
index 40e34707acd4e39378264baad312fb5a21ac05c9..874a434476039753f167e4c329737d136a476137 100644
--- a/test/fuzzer/regexp.cc
+++ b/test/fuzzer/regexp.cc
@@ -62,7 +62,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
v8::TryCatch try_catch(isolate);
i::MaybeHandle<i::JSRegExp> maybe_regexp =
i::JSRegExp::New(source, static_cast<i::JSRegExp::Flags>(flags));
- if (!maybe_regexp.ToHandle(&regexp)) continue;
+ if (!maybe_regexp.ToHandle(&regexp)) {
+ i_isolate->clear_pending_exception();
+ continue;
+ }
}
Test(isolate, regexp, one_byte, results_array);
Test(isolate, regexp, two_byte, results_array);
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698