Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index a4b311f6ecacd7d4b4a760931475bf4d9405c2ec..0210f19d4f51728431f81639da067f6edfe76a3d 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -2343,6 +2343,18 @@ void Isolate::RunMicrotasks() { |
} |
+void Isolate::SetUseCounterCallback(v8::Isolate::UseCounterCallback callback) { |
+ ASSERT(!use_counter_callback_); |
+ use_counter_callback_ = callback; |
+} |
+ |
+ |
+void Isolate::CountUsage(v8::Isolate::UseCounterFeature feature) { |
+ if (use_counter_callback_) |
Sven Panne
2014/06/23 09:29:39
Following the good example of the Heartbleed bug h
|
+ use_counter_callback_(reinterpret_cast<v8::Isolate*>(this), feature); |
+} |
+ |
+ |
bool StackLimitCheck::JsHasOverflowed() const { |
StackGuard* stack_guard = isolate_->stack_guard(); |
#ifdef USE_SIMULATOR |