Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index 731fdb373528761b0ccd26c37096b100e22b6eb8..4ab7af6d2c7fedd22e61b098b0d2038285d0f3d2 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -36,6 +36,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" |
@@ -2953,6 +2954,13 @@ int Shell::Main(int argc, char* argv[]) { |
create_params.add_histogram_sample_callback = AddHistogramSample; |
} |
+ if (i::trap_handler::UseTrapHandler()) { |
+ if (!v8::V8::RegisterDefaultSignalHandler()) { |
+ fprintf(stderr, "Could not register signal handler"); |
+ exit(1); |
+ } |
+ } |
+ |
Isolate* isolate = Isolate::New(create_params); |
{ |
Isolate::Scope scope(isolate); |