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

Unified Diff: src/api.cc

Issue 2117343006: Introduce v8::CpuProfiler::New and v8::CpuProfiler::Dispose API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove ProfilerExtension::Scope Created 4 years, 5 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-profiler.h ('k') | src/isolate.h » ('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 07351c9aab150fb42e9c20d33192cd0700e448ee..58f8a7a3ac5e07926c55f55ca0e80aeda57f7181 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -8420,6 +8420,12 @@ int CpuProfile::GetSamplesCount() const {
return reinterpret_cast<const i::CpuProfile*>(this)->samples_count();
}
+CpuProfiler* CpuProfiler::New(Isolate* isolate) {
+ return reinterpret_cast<CpuProfiler*>(
+ new i::CpuProfiler(reinterpret_cast<i::Isolate*>(isolate)));
+}
+
+void CpuProfiler::Dispose() { delete reinterpret_cast<i::CpuProfiler*>(this); }
void CpuProfiler::SetSamplingInterval(int us) {
DCHECK_GE(us, 0);
« no previous file with comments | « include/v8-profiler.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698