Index: src/api.cc |
=================================================================== |
--- src/api.cc (revision 7355) |
+++ src/api.cc (working copy) |
@@ -4343,19 +4343,19 @@ |
void V8::SetCounterFunction(CounterLookupCallback callback) { |
- i::Isolate* isolate = i::Isolate::Current(); |
+ i::Isolate* isolate = EnterIsolateIfNeeded(); |
if (IsDeadCheck(isolate, "v8::V8::SetCounterFunction()")) return; |
isolate->stats_table()->SetCounterFunction(callback); |
} |
void V8::SetCreateHistogramFunction(CreateHistogramCallback callback) { |
- i::Isolate* isolate = i::Isolate::Current(); |
+ i::Isolate* isolate = EnterIsolateIfNeeded(); |
if (IsDeadCheck(isolate, "v8::V8::SetCreateHistogramFunction()")) return; |
isolate->stats_table()->SetCreateHistogramFunction(callback); |
} |
void V8::SetAddHistogramSampleFunction(AddHistogramSampleCallback callback) { |
- i::Isolate* isolate = i::Isolate::Current(); |
+ i::Isolate* isolate = EnterIsolateIfNeeded(); |
if (IsDeadCheck(isolate, "v8::V8::SetAddHistogramSampleFunction()")) return; |
isolate->stats_table()-> |
SetAddHistogramSampleFunction(callback); |