[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}
This commit is contained in:
yangguo 2016-08-12 04:05:43 -07:00 committed by Commit bot
parent ed60a76fbf
commit 8b82e0d725
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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;
}