| Index: src/d8.cc
|
| diff --git a/src/d8.cc b/src/d8.cc
|
| index 1e204e96e2ee64e95bb7bc92df334ab8b2b39f18..dc8106bc336069ae811dc45b4ec3cdc6a1512f8f 100644
|
| --- a/src/d8.cc
|
| +++ b/src/d8.cc
|
| @@ -677,7 +677,7 @@ Counter* CounterCollection::GetNextCounter() {
|
| }
|
|
|
|
|
| -void Shell::MapCounters(const char* name) {
|
| +void Shell::MapCounters(v8::Isolate* isolate, const char* name) {
|
| counters_file_ = base::OS::MemoryMappedFile::create(
|
| name, sizeof(CounterCollection), &local_counters_);
|
| void* memory = (counters_file_ == NULL) ?
|
| @@ -687,9 +687,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);
|
| }
|
|
|
|
|
| @@ -897,7 +897,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);
|
|
|