Reviewers: Søren Gjesse,
Description:
Use correct type for the map-counters flag used in d8.
Please review this at http://codereview.chromium.org/6598063/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/d8.cc
M src/flag-definitions.h
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index
4dcc794bb33803ec09cff7dfe684d6cfbc6dba61..9d447ad65d8e0f9c684f9e259205ab69a0d08c84
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);
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
cf13def19f5efaa07d9382e5a8fa2789301cef75..1a14e12c9581a09ea00be07fc6663daabfdecc34
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
\"--\".")
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev