From ad27c1271ee6b9053403616d288b206a6562bcb3 Mon Sep 17 00:00:00 2001 From: "ager@chromium.org" Date: Tue, 1 Mar 2011 12:26:19 +0000 Subject: [PATCH] Use correct type for the map-counters flag used in d8. Review URL: http://codereview.chromium.org/6598063 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/d8.cc | 2 +- src/flag-definitions.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/d8.cc b/src/d8.cc index 4dcc794..9d447ad 100644 --- a/src/d8.cc +++ b/src/d8.cc @@ -405,7 +405,7 @@ void Shell::AddHistogramSample(void* histogram, int sample) { void Shell::Initialize() { Shell::counter_map_ = new CounterMap(); // Set up counters - if (i::FLAG_map_counters != NULL) + if (i::StrLength(i::FLAG_map_counters) != 0) MapCounters(i::FLAG_map_counters); if (i::FLAG_dump_counters) { V8::SetCounterFunction(LookupCounter); diff --git a/src/flag-definitions.h b/src/flag-definitions.h index cf13def..1a14e12 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -355,7 +355,7 @@ DEFINE_bool(remote_debugger, false, "Connect JavaScript debugger to the " "debugger agent in another process") DEFINE_bool(debugger_agent, false, "Enable debugger agent") DEFINE_int(debugger_port, 5858, "Port to use for remote debugging") -DEFINE_string(map_counters, NULL, "Map counters to a file") +DEFINE_string(map_counters, "", "Map counters to a file") DEFINE_args(js_arguments, JSArguments(), "Pass all remaining arguments to the script. Alias for \"--\".") -- 2.7.4