Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: src/api.cc

Issue 1010233002: Make counter and histogram related callbacks part of the Isolate::CreateParams. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8.h ('k') | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index fd17edfc568cc16e1f20595c0f96f8d2ba32bd90..31707d999d4cff41b70648b7d4168a22b8fc3420 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6803,6 +6803,18 @@ Isolate* Isolate::New(const Isolate::CreateParams& params) {
isolate->logger()->SetCodeEventHandler(kJitCodeEventDefault,
params.code_event_handler);
}
+ if (params.counter_lookup_callback) {
+ v8_isolate->SetCounterFunction(params.counter_lookup_callback);
+ }
+
+ if (params.create_histogram_callback) {
+ v8_isolate->SetCreateHistogramFunction(params.create_histogram_callback);
+ }
+
+ if (params.add_histogram_sample_callback) {
+ v8_isolate->SetAddHistogramSampleFunction(
+ params.add_histogram_sample_callback);
+ }
SetResourceConstraints(isolate, params.constraints);
// TODO(jochen): Once we got rid of Isolate::Current(), we can remove this.
Isolate::Scope isolate_scope(v8_isolate);
« no previous file with comments | « include/v8.h ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698