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

Unified Diff: test/cctest/test-cpu-profiler.cc

Issue 1045753002: CpuProfiler: public API for deopt info in cpu profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments addressed 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
« src/api.cc ('K') | « src/profile-generator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-cpu-profiler.cc
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
index a8cbdd505cfe0626de7669c6d952a5cccd8dca52..7ae88c005591e57e59b89746647bd4269b85c333 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -56,8 +56,10 @@ static v8::Local<v8::Function> GetFunction(v8::Context* env, const char* name) {
}
-static int offset(const char* src, const char* substring) {
- return static_cast<int>(strstr(src, substring) - src);
+static unsigned int offset(const char* src, const char* substring) {
+ const char* it = strstr(src, substring);
+ ASSERT(it);
Jakob Kummerow 2015/03/30 13:35:28 You mean DCHECK.
+ return static_cast<unsigned int>(it - src);
}
« src/api.cc ('K') | « src/profile-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698