Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index 03356e15a0001819b0865b6854d51d933eb51457..661307f0dfebb306d7db20293ab3c50f2716067d 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -665,7 +665,7 @@ Counter* CounterCollection::GetNextCounter() { |
} |
-void Shell::MapCounters(const char* name) { |
+void Shell::MapCounters(v8::Isolate* isolate, const char* name) { |
counters_file_ = i::OS::MemoryMappedFile::create( |
name, sizeof(CounterCollection), &local_counters_); |
void* memory = (counters_file_ == NULL) ? |
@@ -675,9 +675,9 @@ void Shell::MapCounters(const char* name) { |
Exit(1); |
} |
counters_ = static_cast<CounterCollection*>(memory); |
- V8::SetCounterFunction(LookupCounter); |
- V8::SetCreateHistogramFunction(CreateHistogram); |
- V8::SetAddHistogramSampleFunction(AddHistogramSample); |
+ isolate->SetCounterFunction(LookupCounter); |
+ isolate->SetCreateHistogramFunction(CreateHistogram); |
+ isolate->SetAddHistogramSampleFunction(AddHistogramSample); |
} |
@@ -887,7 +887,7 @@ void Shell::Initialize(Isolate* isolate) { |
Shell::counter_map_ = new CounterMap(); |
// Set up counters |
if (i::StrLength(i::FLAG_map_counters) != 0) |
- MapCounters(i::FLAG_map_counters); |
+ MapCounters(isolate, i::FLAG_map_counters); |
if (i::FLAG_dump_counters || i::FLAG_track_gc_object_stats) { |
V8::SetCounterFunction(LookupCounter); |
V8::SetCreateHistogramFunction(CreateHistogram); |