| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 0a7da7d74015c952ef71380634d93dd4aa1d17b0..af8054f1b446dd86ef7e6f92335427235cfb5820 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -4398,19 +4398,19 @@ void V8::SetCaptureStackTraceForUncaughtExceptions(
|
|
|
|
|
| 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);
|
|
|