2019-05-28 08:46:21 -04:00
|
|
|
// Copyright 2019 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.
|
|
|
|
|
2021-09-17 14:34:02 +02:00
|
|
|
// Flags: --expose-gc --stress-flush-code --flush-bytecode
|
2019-05-28 08:46:21 -04:00
|
|
|
|
|
|
|
var Debug = debug.Debug
|
|
|
|
var bp;
|
|
|
|
|
|
|
|
Debug.setListener(function (event, exec_state, event_data, data) {
|
|
|
|
if (event == Debug.DebugEvent.Break) {
|
|
|
|
Debug.clearBreakPoint(bp);
|
|
|
|
gc();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
function f() {
|
|
|
|
(function () {})();
|
|
|
|
}
|
|
|
|
|
|
|
|
bp = Debug.setBreakPoint(f, 0, 0);
|
|
|
|
f();
|