2014-08-22 12:55:23 +00:00
|
|
|
// 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.
|
|
|
|
|
|
|
|
// Flags: --allow-natives-syntax --expose-debug-as debug
|
|
|
|
|
|
|
|
Debug = debug.Debug
|
2015-12-16 08:39:39 +00:00
|
|
|
var exception = null;
|
2014-08-22 12:55:23 +00:00
|
|
|
|
|
|
|
function listener(event, exec_state, event_data, data) {
|
|
|
|
try {
|
|
|
|
if (event == Debug.DebugEvent.Break) {
|
2015-12-16 08:39:39 +00:00
|
|
|
exec_state.prepareStep(Debug.StepAction.StepIn);
|
2014-08-22 12:55:23 +00:00
|
|
|
}
|
|
|
|
} catch (e) {
|
2015-12-16 08:39:39 +00:00
|
|
|
exception = e;
|
2014-08-22 12:55:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Debug.setListener(listener);
|
|
|
|
|
|
|
|
function f(x) {
|
2015-11-05 11:48:07 +00:00
|
|
|
if (x > 0) %_Call(f, null, x-1);
|
2014-08-22 12:55:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
debugger;
|
|
|
|
f(2);
|
|
|
|
|
|
|
|
Debug.setListener(null);
|
2015-12-16 08:39:39 +00:00
|
|
|
assertNull(exception);
|