Skip to content

Commit 92de0bc

Browse files
alexkozyevanlucas
authored andcommitted
inspector: fix inspector hang while disconnecting
If user make some actions during (e.g. stepOver native call) that requests program break and disconnect DevTools frontend then AgentImpl won't be disconnected until other message from frontend. The root of issue: 1. Inspector requests program break. 2. User requests disconnect (e.g. refresh page with DevTools frontend). 3. On program break V8Inspector call runMessageLoopOnPause on V8NodeInspector. 4. Message loop will wait until next message from frontend. 5. After message Agent will be disconnected. We can dispatch all pending message on step 3 to solve a problem. PR-URL: #8021 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
1 parent 14c7dcb commit 92de0bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/inspector_agent.cc

+1
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ class V8NodeInspector : public blink::V8InspectorClient {
305305
return;
306306
terminated_ = false;
307307
running_nested_loop_ = true;
308+
agent_->DispatchMessages();
308309
do {
309310
{
310311
Mutex::ScopedLock scoped_lock(agent_->pause_lock_);

0 commit comments

Comments
 (0)