| // Copyright 2017 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. |
| %PrepareFunctionForOptimization(h); |
| function listener(event, exec_state, event_data, data) { |
| if (event != Debug.DebugEvent.Break) return; |
| exec_state.prepareStep(Debug.StepAction.StepOut); |
| assertTrue(exec_state.frame().sourceLineText().includes('Break')); |
| Debug.setListener(listener); |
| %OptimizeFunctionOnNextCall(h); |
| assertEquals(2, step_count); |