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
This commit is contained in:
jochen@chromium.org 2014-07-09 14:03:05 +00:00
parent 562274b60d
commit c1f6a0306e
3 changed files with 3 additions and 51 deletions

View File

@ -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);

View File

@ -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();

View File

@ -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
}