2048ee8b1d
When clearing a DebugInfo, we need to check whether that function is currently executing and, if so, update the on-stack BytecodeArray pointer to refer to the original BytecodeArray. Otherwise, the original BytecodeArray might get flushed, which can cause problems when attempting to resume execution of the function. Bug: v8:9067 Change-Id: Ief28a501294f5a34052e13f618fa084311eaa0b8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1548573 Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/master@{#60774}
23 lines
486 B
JavaScript
23 lines
486 B
JavaScript
// 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.
|
|
|
|
// Flags: --expose-gc --stress-flush-bytecode
|
|
|
|
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();
|