regress-9067.js 499 Bytes
Newer Older
1 2 3 4
// 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.

5
// Flags: --expose-gc --stress-flush-code --flush-bytecode
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

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();