Commit 1c4f8083 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Eager compile for debugging when debug is active.

Scenario:
On reload, Devtools restores previously set break points. At this point,
since Devtools is already opened, all code is compiled with debug break
slots. No break points exist yet, so we would lazily compile inner
functions, even ones that cannot be compiled lazily without a context.
So when we use Debug::FindSharedFunctionInfoInScript to find the break
positions, those lazily compiled functions are skipped.

By eagerly compiling when debug is active, we make sure that whenever
Devtools is open, functions that cannot be compiled lazily without a
context are always compiled with its outer function.

R=ulan@chromium.org
BUG=chromium:424142
LOG=N

Review URL: https://codereview.chromium.org/683413003

Cr-Commit-Position: refs/heads/master@{#24971}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 64cef0b2
...@@ -1437,8 +1437,10 @@ Handle<Code> Compiler::GetConcurrentlyOptimizedCode(OptimizedCompileJob* job) { ...@@ -1437,8 +1437,10 @@ Handle<Code> Compiler::GetConcurrentlyOptimizedCode(OptimizedCompileJob* job) {
bool Compiler::DebuggerWantsEagerCompilation(CompilationInfo* info, bool Compiler::DebuggerWantsEagerCompilation(CompilationInfo* info,
bool allow_lazy_without_ctx) { bool allow_lazy_without_ctx) {
return LiveEditFunctionTracker::IsActive(info->isolate()) || if (LiveEditFunctionTracker::IsActive(info->isolate())) return true;
(info->isolate()->DebuggerHasBreakPoints() && !allow_lazy_without_ctx); Debug* debug = info->isolate()->debug();
bool debugging = debug->is_active() || debug->has_break_points();
return debugging && !allow_lazy_without_ctx;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment