12f4751942
This mistake was introduced during big liveedit refactoring. Reported in Node.js: https://github.com/nodejs/node/issues/28493 R=dgozman@chromium.org,yangguo@chromium.org Change-Id: Ic19984f1776dd5e0a25c6d7c41b4a7b7a9c76d22 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1683101 Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#62479}
34 lines
1.2 KiB
JavaScript
34 lines
1.2 KiB
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.
|
|
|
|
const {session, Protocol} =
|
|
InspectorTest.start('Checks that Debugger.restartFrame works');
|
|
|
|
session.setupScriptMap();
|
|
|
|
(async function test() {
|
|
Protocol.Debugger.enable();
|
|
const evalPromise = Protocol.Runtime.evaluate({
|
|
expression: 'function foo() { debugger; }; foo();'
|
|
});
|
|
InspectorTest.log('Paused at debugger:');
|
|
const { params: { callFrames: before } } =
|
|
await Protocol.Debugger.oncePaused();
|
|
await session.logSourceLocation(before[0].location);
|
|
InspectorTest.log('Call restart and dump location of restart:');
|
|
const { result: { callFrames: restart }} =
|
|
await Protocol.Debugger.restartFrame({
|
|
callFrameId: before[0].callFrameId
|
|
});
|
|
await session.logSourceLocation(restart[0].location);
|
|
InspectorTest.log('Location after restart:');
|
|
Protocol.Debugger.resume();
|
|
const { params: { callFrames: after } } =
|
|
await Protocol.Debugger.oncePaused();
|
|
await session.logSourceLocation(after[0].location);
|
|
Protocol.Debugger.resume();
|
|
await evalPromise;
|
|
InspectorTest.completeTest();
|
|
})()
|