Index: test/cctest/interpreter/generate-bytecode-expectations.cc |
diff --git a/test/cctest/interpreter/generate-bytecode-expectations.cc b/test/cctest/interpreter/generate-bytecode-expectations.cc |
index 0c9874020bdb5a2a138348941591c7c7695839e3..9d73b325a6ef34bdffea330b7768f9a446d19e6a 100644 |
--- a/test/cctest/interpreter/generate-bytecode-expectations.cc |
+++ b/test/cctest/interpreter/generate-bytecode-expectations.cc |
@@ -67,6 +67,7 @@ class ProgramOptions final { |
bool legacy_const() const { return legacy_const_; } |
bool do_expressions() const { return do_expressions_; } |
bool verbose() const { return verbose_; } |
+ bool suppress_runtime_errors() const { return rebaseline_ && !verbose_; } |
BytecodeExpectationsPrinter::ConstantPoolType const_pool_type() const { |
return const_pool_type_; |
} |
@@ -484,6 +485,12 @@ bool WriteExpectationsFile(const std::vector<std::string>& snippet_list, |
return true; |
} |
+void PrintMessage(v8::Local<v8::Message> message, v8::Local<v8::Value>) { |
+ std::cerr << "INFO: " << *v8::String::Utf8Value(message->Get()) << '\n'; |
+} |
+ |
+void DiscardMessage(v8::Local<v8::Message>, v8::Local<v8::Value>) {} |
+ |
void PrintUsage(const char* exec_path) { |
std::cerr |
<< "\nUsage: " << exec_path |
@@ -528,6 +535,8 @@ int main(int argc, char** argv) { |
} |
V8InitializationScope platform(argv[0]); |
+ platform.isolate()->AddMessageListener( |
+ options.suppress_runtime_errors() ? DiscardMessage : PrintMessage); |
std::vector<std::string> snippet_list; |