2014-10-10 14:49:02 +04: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.
|
|
|
|
|
|
|
|
|
|
|
|
Debug = debug.Debug
|
2016-03-01 08:58:05 -08:00
|
|
|
var exception = null;
|
2014-10-10 14:49:02 +04:00
|
|
|
|
|
|
|
function listener(event, exec_state, event_data, data) {
|
|
|
|
try {
|
|
|
|
if (event == Debug.DebugEvent.Break) {
|
2021-08-29 14:20:49 +02:00
|
|
|
exec_state.prepareStep(Debug.StepAction.StepInto);
|
2014-10-10 14:49:02 +04:00
|
|
|
}
|
|
|
|
} catch (e) {
|
2016-03-01 08:58:05 -08:00
|
|
|
exception = e;
|
2014-10-10 14:49:02 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Debug.setListener(listener);
|
|
|
|
|
|
|
|
function f(x) {
|
2021-08-29 14:20:49 +02:00
|
|
|
if (x > 0) %Call(f, null, x-1);
|
2014-10-10 14:49:02 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
debugger;
|
|
|
|
f(2);
|
|
|
|
|
|
|
|
Debug.setListener(null);
|
2016-03-01 08:58:05 -08:00
|
|
|
assertNull(exception);
|