Use correct type for the map-counters flag used in d8.
authorager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 1 Mar 2011 12:26:19 +0000 (12:26 +0000)
committerager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 1 Mar 2011 12:26:19 +0000 (12:26 +0000)
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
src/flag-definitions.h

index 4dcc794..9d447ad 100644 (file)
--- 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);
index cf13def..1a14e12 100644 (file)
@@ -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 \"--\".")