/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/v8/test/inspector/debugger/debug-evaluate-explicit-resource-management.js
44 строки
1 KB
Michaël Zasso
deps: update V8 to 13.6.233.8
02 май 2025, 16:06
Не верифицирован
02 май 2025, 16:06
918fe04
Код
Авторство
О чём код?
// Copyright 2024 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: --js-staging const {Protocol} = InspectorTest.start('Check that `using` and `await using` do not work in debug evaluate.'); (async function testExplicitResourceManagement() { await Protocol.Debugger.enable(); await Protocol.Runtime.enable(); const promise = Protocol.Debugger.oncePaused(); Protocol.Runtime.evaluate({ expression: 'debugger;' }); const { params: { callFrames: [{ callFrameId, functionLocation: { scriptId } }] } } = await promise; InspectorTest.logMessage(await Protocol.Debugger.evaluateOnCallFrame({ callFrameId, expression: ` using x = { value: 1, [Symbol.dispose]() { return 42; } }; ` })); InspectorTest.logMessage(await Protocol.Debugger.evaluateOnCallFrame({ callFrameId, expression: ` await using y = { value: 2, [Symbol.asyncDispose]() { return 43; } }; ` })); Protocol.Debugger.resume(); InspectorTest.completeTest(); })();