From c1f6a0306e0c25610ed077d78ce156137673b9ae Mon Sep 17 00:00:00 2001 From: "jochen@chromium.org" Date: Wed, 9 Jul 2014 14:03:05 +0000 Subject: [PATCH] Remove deprecate counter/histogram methods Callers should use the methods with the same name on Isolate instead. BUG=none R=dcarney@chromium.org LOG=y Review URL: https://codereview.chromium.org/371023004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22304 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- include/v8.h | 22 ---------------------- src/api.cc | 26 -------------------------- src/d8.cc | 6 +++--- 3 files changed, 3 insertions(+), 51 deletions(-) diff --git a/include/v8.h b/include/v8.h index 88e9a61..11bf598 100644 --- a/include/v8.h +++ b/include/v8.h @@ -4760,28 +4760,6 @@ class V8_EXPORT V8 { /** Get the version string. */ static const char* GetVersion(); - /** - * Enables the host application to provide a mechanism for recording - * statistics counters. - * - * Deprecated, use Isolate::SetCounterFunction instead. - */ - static void SetCounterFunction(CounterLookupCallback); - - /** - * Enables the host application to provide a mechanism for recording - * histograms. The CreateHistogram function returns a - * histogram which will later be passed to the AddHistogramSample - * function. - * - * Deprecated, use Isolate::SetCreateHistogramFunction instead. - * Isolate::SetAddHistogramSampleFunction instead. - */ - static void SetCreateHistogramFunction(CreateHistogramCallback); - - /** Deprecated, use Isolate::SetAddHistogramSampleFunction instead. */ - static void SetAddHistogramSampleFunction(AddHistogramSampleCallback); - /** Callback function for reporting failed access checks.*/ static void SetFailedAccessCheckCallbackFunction(FailedAccessCheckCallback); diff --git a/src/api.cc b/src/api.cc index 8238922..d01d826 100644 --- a/src/api.cc +++ b/src/api.cc @@ -6351,32 +6351,6 @@ void V8::SetCaptureStackTraceForUncaughtExceptions( } -void V8::SetCounterFunction(CounterLookupCallback callback) { - i::Isolate* isolate = i::Isolate::UncheckedCurrent(); - // TODO(svenpanne) The Isolate should really be a parameter. - if (isolate == NULL) return; - isolate->stats_table()->SetCounterFunction(callback); -} - - -void V8::SetCreateHistogramFunction(CreateHistogramCallback callback) { - i::Isolate* isolate = i::Isolate::UncheckedCurrent(); - // TODO(svenpanne) The Isolate should really be a parameter. - if (isolate == NULL) return; - isolate->stats_table()->SetCreateHistogramFunction(callback); - isolate->InitializeLoggingAndCounters(); - isolate->counters()->ResetHistograms(); -} - - -void V8::SetAddHistogramSampleFunction(AddHistogramSampleCallback callback) { - i::Isolate* isolate = i::Isolate::UncheckedCurrent(); - // TODO(svenpanne) The Isolate should really be a parameter. - if (isolate == NULL) return; - isolate->stats_table()-> - SetAddHistogramSampleFunction(callback); -} - void V8::SetFailedAccessCheckCallbackFunction( FailedAccessCheckCallback callback) { i::Isolate* isolate = i::Isolate::Current(); diff --git a/src/d8.cc b/src/d8.cc index dc8106b..4e0d86f 100644 --- a/src/d8.cc +++ b/src/d8.cc @@ -899,9 +899,9 @@ void Shell::Initialize(Isolate* isolate) { if (i::StrLength(i::FLAG_map_counters) != 0) MapCounters(isolate, i::FLAG_map_counters); if (i::FLAG_dump_counters || i::FLAG_track_gc_object_stats) { - V8::SetCounterFunction(LookupCounter); - V8::SetCreateHistogramFunction(CreateHistogram); - V8::SetAddHistogramSampleFunction(AddHistogramSample); + isolate->SetCounterFunction(LookupCounter); + isolate->SetCreateHistogramFunction(CreateHistogram); + isolate->SetAddHistogramSampleFunction(AddHistogramSample); } #endif // !V8_SHARED } -- 2.7.4