| 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..b46db63b616909eb15f119123be2800ed4fcd3fb 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 size_t offset(const char* src, const char* substring) {
|
| + const char* it = strstr(src, substring);
|
| + CHECK(it);
|
| + return static_cast<size_t>(it - src);
|
| }
|
|
|
|
|
| @@ -1898,10 +1900,11 @@ TEST(DeoptAtFirstLevelInlinedSource) {
|
| const char* branch[] = {"", "test"};
|
| const ProfileNode* itest_node =
|
| GetSimpleBranch(profile, branch, arraysize(branch));
|
| - const std::vector<i::DeoptInfo>& deopt_infos = itest_node->deopt_infos();
|
| + const std::vector<v8::CpuProfileDeoptInfo>& deopt_infos =
|
| + itest_node->deopt_infos();
|
| CHECK_EQ(1, deopt_infos.size());
|
|
|
| - const i::DeoptInfo& info = deopt_infos[0];
|
| + const v8::CpuProfileDeoptInfo& info = deopt_infos[0];
|
| CHECK_EQ(reason(i::Deoptimizer::kNotAHeapNumber), info.deopt_reason);
|
| CHECK_EQ(2, info.stack.size());
|
| CHECK_EQ(inlined_script_id, info.stack[0].script_id);
|
| @@ -1970,10 +1973,11 @@ TEST(DeoptAtSecondLevelInlinedSource) {
|
| const char* branch[] = {"", "test1"};
|
| const ProfileNode* itest_node =
|
| GetSimpleBranch(profile, branch, arraysize(branch));
|
| - const std::vector<i::DeoptInfo>& deopt_infos = itest_node->deopt_infos();
|
| + const std::vector<v8::CpuProfileDeoptInfo>& deopt_infos =
|
| + itest_node->deopt_infos();
|
| CHECK_EQ(1, deopt_infos.size());
|
|
|
| - const i::DeoptInfo info = deopt_infos[0];
|
| + const v8::CpuProfileDeoptInfo info = deopt_infos[0];
|
| CHECK_EQ(reason(i::Deoptimizer::kNotAHeapNumber), info.deopt_reason);
|
| CHECK_EQ(3, info.stack.size());
|
| CHECK_EQ(inlined_script_id, info.stack[0].script_id);
|
|
|