%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); const assert = require('assert'); const { NodeInstance } = require('../common/inspector-helper.js'); function mainContextDestroyed(notification) { return notification.method === 'Runtime.executionContextDestroyed' && notification.params.executionContextId === 1; } async function runTest() { const child = new NodeInstance(['--inspect-brk=0', '-e', 'process.exit(55)']); const session = await child.connectInspectorSession(); const oldStyleSession = await child.connectInspectorSession(); await oldStyleSession.send([ { method: 'Runtime.enable' }]); await session.send([ { method: 'Runtime.enable' }, { method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params: { enabled: true } }, { method: 'Runtime.runIfWaitingForDebugger' }]); await session.waitForNotification((notification) => { return notification.method === 'NodeRuntime.waitingForDisconnect'; }); const receivedExecutionContextDestroyed = session.unprocessedNotifications().some(mainContextDestroyed); if (receivedExecutionContextDestroyed) { assert.fail('When NodeRuntime enabled, ' + 'Runtime.executionContextDestroyed should not be sent'); } const { result: { value } } = await session.send({ method: 'Runtime.evaluate', params: { expression: '42' } }); assert.strictEqual(value, 42); await session.disconnect(); await oldStyleSession.waitForNotification(mainContextDestroyed); await oldStyleSession.disconnect(); assert.strictEqual((await child.expectShutdown()).exitCode, 55); } runTest().then(common.mustCall());