Fixed the caching of counters. This also fixes the --dump-counters which reads the...
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 5 Dec 2008 10:40:13 +0000 (10:40 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 5 Dec 2008 10:40:13 +0000 (10:40 +0000)
Review URL: http://codereview.chromium.org/13171

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/d8.cc

index 03a6ab6..fbc91d3 100644 (file)
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -257,6 +257,7 @@ int* Shell::LookupCounter(const char* name) {
   }
   Counter* result = counters_->GetNextCounter();
   if (result == NULL) return NULL;
+  counter_map_[name] = result;
   return result->Bind(name);
 }