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

Unified Diff: src/api.cc

Issue 2083005: CPU profiler: add secure profiles by filtering out functions using security tokens. (Closed)
Patch Set: Reworded comment Created 10 years, 7 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/cpu-profiler.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 a4c38b72c248be34fdf0be53056438aae663c9e6..42c8aeb6d734041b242acc10ce467ae0d9b84429 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -4250,15 +4250,23 @@ int CpuProfiler::GetProfilesCount() {
}
-const CpuProfile* CpuProfiler::GetProfile(int index) {
+const CpuProfile* CpuProfiler::GetProfile(int index,
+ Handle<Value> security_token) {
IsDeadCheck("v8::CpuProfiler::GetProfile");
- return reinterpret_cast<const CpuProfile*>(i::CpuProfiler::GetProfile(index));
+ return reinterpret_cast<const CpuProfile*>(
+ i::CpuProfiler::GetProfile(
+ security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
+ index));
}
-const CpuProfile* CpuProfiler::FindProfile(unsigned uid) {
+const CpuProfile* CpuProfiler::FindProfile(unsigned uid,
+ Handle<Value> security_token) {
IsDeadCheck("v8::CpuProfiler::FindProfile");
- return reinterpret_cast<const CpuProfile*>(i::CpuProfiler::FindProfile(uid));
+ return reinterpret_cast<const CpuProfile*>(
+ i::CpuProfiler::FindProfile(
+ security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
+ uid));
}
@@ -4268,10 +4276,13 @@ void CpuProfiler::StartProfiling(Handle<String> title) {
}
-const CpuProfile* CpuProfiler::StopProfiling(Handle<String> title) {
+const CpuProfile* CpuProfiler::StopProfiling(Handle<String> title,
+ Handle<Value> security_token) {
IsDeadCheck("v8::CpuProfiler::StopProfiling");
return reinterpret_cast<const CpuProfile*>(
- i::CpuProfiler::StopProfiling(*Utils::OpenHandle(*title)));
+ i::CpuProfiler::StopProfiling(
+ security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token),
+ *Utils::OpenHandle(*title)));
}
#endif // ENABLE_LOGGING_AND_PROFILING
« no previous file with comments | « include/v8-profiler.h ('k') | src/cpu-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698