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

Unified Diff: src/d8.cc

Issue 2854173002: Make in process stack dumping optional. (Closed)
Patch Set: Address comments Created 3 years, 8 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
« no previous file with comments | « src/d8.h ('k') | src/libplatform/default-platform.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index a455ac0b1c0f91c9d800da6b935b27f6a63659cd..297a573971bfefcdf005c6e0c6788e0ceb01cea4 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -2602,6 +2602,9 @@ bool Shell::SetOptions(int argc, char* argv[]) {
} else if (strncmp(argv[i], "--lcov=", 7) == 0) {
options.lcov_file = argv[i] + 7;
argv[i] = NULL;
+ } else if (strcmp(argv[i], "--disable-in-process-stack-traces") == 0) {
+ options.disable_in_process_stack_traces = true;
+ argv[i] = NULL;
}
}
@@ -2961,10 +2964,17 @@ int Shell::Main(int argc, char* argv[]) {
#endif // defined(_WIN32) || defined(_WIN64)
if (!SetOptions(argc, argv)) return 1;
v8::V8::InitializeICUDefaultLocation(argv[0], options.icu_data_file);
+
+ v8::platform::InProcessStackDumping in_process_stack_dumping =
+ options.disable_in_process_stack_traces
+ ? v8::platform::InProcessStackDumping::kDisabled
+ : v8::platform::InProcessStackDumping::kEnabled;
+
g_platform = i::FLAG_verify_predictable
? new PredictablePlatform()
: v8::platform::CreateDefaultPlatform(
- 0, v8::platform::IdleTaskSupport::kEnabled);
+ 0, v8::platform::IdleTaskSupport::kEnabled,
+ in_process_stack_dumping);
platform::tracing::TracingController* tracing_controller;
if (options.trace_enabled) {
« no previous file with comments | « src/d8.h ('k') | src/libplatform/default-platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698