-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inspector: libuv notification on incoming message
Currently Inspector posts a V8 "task" when a message is incoming. To make sure messages are processed even when no JS is executed (e.g. while waiting for I/O or timer), inspector will now post a libuv request. Fixes: #11589 PR-URL: #11617 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
- Loading branch information
Showing
3 changed files
with
51 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
require('../common'); | ||
const helper = require('./inspector-helper.js'); | ||
|
||
function shouldShutDown(session) { | ||
session | ||
.sendInspectorCommands([ | ||
{ 'method': 'Debugger.enable' }, | ||
{ 'method': 'Debugger.pause' }, | ||
]) | ||
.disconnect(true); | ||
} | ||
|
||
function runTests(harness) { | ||
// 1 second wait to make sure the inferior began running the script | ||
setTimeout(() => harness.runFrontendSession([shouldShutDown]).kill(), 1000); | ||
} | ||
|
||
const script = 'setInterval(() => {debugger;}, 60000);'; | ||
helper.startNodeForInspectorTest(runTests, '--inspect', script); |