[test] Introduce flag to disable AbortJS function

During GC fuzzing we combine multiple tests and run them inside
a wrapper that needs to ignore all errors/exceptions/asserts to
keep the combined tests running. We will use this flag to ignore
%AbortJS calls.

Bug: v8:6917
Change-Id: Ib426a68228cadbea8364c5e1d29c39dd53129481
Reviewed-on: https://chromium-review.googlesource.com/857514
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#50768}
This commit is contained in:
Michal Majewski 2018-01-09 20:27:25 +01:00 committed by Commit Bot
parent b5e6a1517e
commit edf82ca34d
2 changed files with 6 additions and 0 deletions

View File

@ -728,6 +728,8 @@ DEFINE_INT(stress_scavenge, 0,
DEFINE_IMPLICATION(fuzzer_gc_analysis, stress_marking)
DEFINE_IMPLICATION(fuzzer_gc_analysis, stress_scavenge)
DEFINE_BOOL(disable_abortjs, false, "disables AbortJS runtime function")
DEFINE_BOOL(manual_evacuation_candidates_selection, false,
"Test mode only flag. It allows an unit test to select evacuation "
"candidates pages (requires --stress_compaction).")

View File

@ -784,6 +784,10 @@ RUNTIME_FUNCTION(Runtime_AbortJS) {
HandleScope scope(isolate);
DCHECK_EQ(1, args.length());
CONVERT_ARG_HANDLE_CHECKED(String, message, 0);
if (FLAG_disable_abortjs) {
base::OS::PrintError("[disabled] abort: %s\n", message->ToCString().get());
return nullptr;
}
base::OS::PrintError("abort: %s\n", message->ToCString().get());
isolate->PrintStack(stderr);
base::OS::Abort();