Commit cc8fa95f authored by yangguo's avatar yangguo Committed by Commit bot

Debugger: fix deoptimizing inlined function.

BUG=v8:4320
LOG=N
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29842}
parent 0752abb1
......@@ -1461,7 +1461,7 @@ bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) {
if (function->code()->kind() == Code::OPTIMIZED_FUNCTION) {
Deoptimizer::DeoptimizeFunction(function);
}
functions.Add(handle(function));
if (function->shared() == *shared) functions.Add(handle(function));
} else if (include_generators && obj->IsJSGeneratorObject()) {
JSGeneratorObject* generator_obj = JSGeneratorObject::cast(obj);
if (!generator_obj->is_suspended()) continue;
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --expose-debug-as debug
var Debug = debug.Debug;
function f() { g(); }
function g() { }
f();
f();
%OptimizeFunctionOnNextCall(f);
f();
Debug.setListener(function() {});
Debug.setBreakPoint(g, 0);
f();
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