-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inspector: libuv notification on incoming message #11617
Conversation
The code change looks good. I tested it out on Windows using VSCode and I no longer get the request timeout errors in the console. The breakpoint gets set immediately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with two nits.
src/inspector_agent.cc
Outdated
@@ -606,6 +608,7 @@ void AgentImpl::PostIncomingMessage(InspectorAction action, int session_id, | |||
platform_->CallOnForegroundThread(isolate, | |||
new DispatchOnInspectorBackendTask(this)); | |||
isolate->RequestInterrupt(InterruptCallback, this); | |||
uv_async_send(&main_thread_req_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you CHECK_EQ(0, uv_async_send(&main_thread_req_))
here?
test/inspector/inspector-helper.js
Outdated
}; | ||
|
||
exports.startNodeForInspectorTest = function(callback, opt_skip_break, | ||
opt_script_contents) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A default param might be nicer for the second argument, i.e., function(callback, arg = '--inspect-brk', contents)
. The string '--inspect'
makes the intent clearer at the call site than a boolean does.
Style issue: we generally use camelCase for arguments and locals in JS land.
@bnoordhuis Thank you for the review. I addressed the comments. |
Landed as f01fd2a |
I would love to see an effort for a wholesale update of the inspect stuff on v6. If not possible please lmk |
I don't think v6.x has this issue, it was introduced in the refactoring that was never backported... Is there a list of inspector issues in v6? |
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
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
inspector