Chromium Code Reviews| 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); |
| } |