diff options
Diffstat (limited to 'deps/v8/test/cctest/test-profile-generator.cc')
-rw-r--r-- | deps/v8/test/cctest/test-profile-generator.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/deps/v8/test/cctest/test-profile-generator.cc b/deps/v8/test/cctest/test-profile-generator.cc index ccebabec30..5cfc4df2a3 100644 --- a/deps/v8/test/cctest/test-profile-generator.cc +++ b/deps/v8/test/cctest/test-profile-generator.cc @@ -674,13 +674,12 @@ static const char* line_number_test_source_profile_time_functions = "bar_at_the_second_line();\n" "function lazy_func_at_6th_line() {}"; -int GetFunctionLineNumber(CpuProfiler& profiler, // NOLINT(runtime/references) - LocalContext& env, // NOLINT(runtime/references) +int GetFunctionLineNumber(CpuProfiler* profiler, LocalContext* env, const char* name) { - CodeMap* code_map = profiler.generator()->code_map(); + CodeMap* code_map = profiler->generator()->code_map(); i::Handle<i::JSFunction> func = i::Handle<i::JSFunction>::cast( v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( - env->Global()->Get(env.local(), v8_str(name)).ToLocalChecked()))); + (*env)->Global()->Get(env->local(), v8_str(name)).ToLocalChecked()))); CodeEntry* func_entry = code_map->FindEntry(func->abstract_code().InstructionStart()); if (!func_entry) FATAL("%s", name); @@ -705,12 +704,12 @@ TEST(LineNumber) { profiler.processor()->StopSynchronously(); bool is_lazy = i::FLAG_lazy; - CHECK_EQ(1, GetFunctionLineNumber(profiler, env, "foo_at_the_first_line")); + CHECK_EQ(1, GetFunctionLineNumber(&profiler, &env, "foo_at_the_first_line")); CHECK_EQ(is_lazy ? 0 : 4, - GetFunctionLineNumber(profiler, env, "lazy_func_at_forth_line")); - CHECK_EQ(2, GetFunctionLineNumber(profiler, env, "bar_at_the_second_line")); + GetFunctionLineNumber(&profiler, &env, "lazy_func_at_forth_line")); + CHECK_EQ(2, GetFunctionLineNumber(&profiler, &env, "bar_at_the_second_line")); CHECK_EQ(is_lazy ? 0 : 6, - GetFunctionLineNumber(profiler, env, "lazy_func_at_6th_line")); + GetFunctionLineNumber(&profiler, &env, "lazy_func_at_6th_line")); profiler.StopProfiling("LineNumber"); } |