regress-crbug-405922.js 572 Bytes
Newer Older
1 2 3 4 5 6
// Copyright 2014 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.


Debug = debug.Debug
7
var exception = null;
8 9 10 11

function listener(event, exec_state, event_data, data) {
  try {
    if (event == Debug.DebugEvent.Break) {
12
      exec_state.prepareStep(Debug.StepAction.StepIn);
13 14
    }
  } catch (e) {
15
    exception = e;
16 17 18 19 20 21
  }
}

Debug.setListener(listener);

function f(x) {
22
  if (x > 0) %_Call(f, null, x-1);
23 24 25 26 27 28
}

debugger;
f(2);

Debug.setListener(null);
29
assertNull(exception);