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

Unified Diff: src/d8.cc

Issue 2371833007: [wasm] Initial signal handler (Closed)
Patch Set: Restore signal mask at the right place Created 3 years, 10 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
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index fcdf2b6e43e0a57f57520d904099e75a63ee7af0..13a9370e5dd8ac5093951b59072eebfaf9a25fc3 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -35,6 +35,7 @@
#include "src/msan.h"
#include "src/objects-inl.h"
#include "src/snapshot/natives.h"
+#include "src/trap-handler/trap-handler.h"
#include "src/utils.h"
#include "src/v8.h"
@@ -2839,6 +2840,13 @@ int Shell::Main(int argc, char* argv[]) {
create_params.add_histogram_sample_callback = AddHistogramSample;
}
+ if (i::trap_handler::ShouldEnableTrapHandler()) {
+ if (!v8::V8::RegisterDefaultSignalHandler()) {
+ fprintf(stderr, "Could not register signal handler");
+ exit(1);
+ }
+ }
+
Isolate* isolate = Isolate::New(create_params);
{
Isolate::Scope scope(isolate);

Powered by Google App Engine
This is Rietveld 408576698