Commit edf82ca3 authored by Michal Majewski's avatar Michal Majewski Committed by Commit Bot

[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/857514Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#50768}
parent b5e6a151
......@@ -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).")
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment