| Index: test/cctest/test-profile-generator.cc
|
| diff --git a/test/cctest/test-profile-generator.cc b/test/cctest/test-profile-generator.cc
|
| index 2f38f02c07ca1dbdd165a13dc6f33b897a3298ce..412d4687c71bdc7879637568a69593b38e9118fb 100644
|
| --- a/test/cctest/test-profile-generator.cc
|
| +++ b/test/cctest/test-profile-generator.cc
|
| @@ -697,8 +697,6 @@
|
| }
|
|
|
| TEST(BailoutReason) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_always_opt = false;
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION);
|
| v8::Context::Scope context_scope(env);
|
| @@ -706,21 +704,14 @@
|
| i::ProfilerExtension::set_profiler(iprofiler.get());
|
|
|
| CHECK_EQ(0, iprofiler->GetProfilesCount());
|
| - v8::Local<v8::Function> function = CompileRun(
|
| - "function Debugger() {\n"
|
| - " startProfiling();\n"
|
| - "}"
|
| - "Debugger")
|
| - .As<v8::Function>();
|
| - i::Handle<i::JSFunction> i_function =
|
| - i::Handle<i::JSFunction>::cast(v8::Utils::OpenHandle(*function));
|
| - // Set a high opt count to trigger bail out.
|
| - i_function->shared()->set_opt_count(10000);
|
| -
|
| - CompileRun(
|
| - "%OptimizeFunctionOnNextCall(Debugger);"
|
| - "Debugger();"
|
| - "stopProfiling()");
|
| + v8::Local<v8::Script> script =
|
| + v8_compile(v8_str("function Debugger() {\n"
|
| + " debugger;\n"
|
| + " startProfiling();\n"
|
| + "}\n"
|
| + "Debugger();\n"
|
| + "stopProfiling();"));
|
| + script->Run(v8::Isolate::GetCurrent()->GetCurrentContext()).ToLocalChecked();
|
| CHECK_EQ(1, iprofiler->GetProfilesCount());
|
| const v8::CpuProfile* profile = i::ProfilerExtension::last_profile;
|
| CHECK(profile);
|
| @@ -730,11 +721,11 @@
|
| // The tree should look like this:
|
| // (root)
|
| // ""
|
| - // kFunctionBeingDebugged
|
| + // kDebuggerStatement
|
| current = PickChild(current, "");
|
| CHECK(const_cast<v8::CpuProfileNode*>(current));
|
|
|
| current = PickChild(current, "Debugger");
|
| CHECK(const_cast<v8::CpuProfileNode*>(current));
|
| - CHECK(!strcmp("Deoptimized too many times", current->GetBailoutReason()));
|
| -}
|
| + CHECK(!strcmp("DebuggerStatement", current->GetBailoutReason()));
|
| +}
|
|
|