Commit 8b82e0d7 authored by yangguo's avatar yangguo Committed by Commit bot

[debug] make sure switching to debug fcg code works.

R=mstarzinger@chromium.org
BUG=v8:5265

Review-Url: https://codereview.chromium.org/2240103002
Cr-Commit-Position: refs/heads/master@{#38607}
parent ed60a76f
......@@ -448,7 +448,7 @@ bool ShouldUseIgnition(CompilationInfo* info) {
// When requesting debug code as a replacement for existing code, we provide
// the same kind as the existing code (to prevent implicit tier-change).
if (info->is_debug() && info->shared_info()->is_compiled()) {
return info->shared_info()->HasBytecodeArray();
return !info->shared_info()->HasBaselineCode();
}
// Since we can't OSR from Ignition, skip Ignition for asm.js functions.
......
......@@ -1325,7 +1325,7 @@ bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) {
DCHECK(baseline_exists || suspended_generators.is_empty());
// We do not need to recompile to debug bytecode.
if (baseline_exists && !shared->HasDebugCode()) {
if (baseline_exists && !shared->code()->has_debug_break_slots()) {
DCHECK(functions.length() > 0);
if (!Compiler::CompileDebugCode(functions.first())) return false;
}
......
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