Browse Source

fix: actually clear pending requests in devtoolsagenthost (#27379)

Shelley Vohr 4 years ago
parent
commit
949cfea1e9
1 changed files with 1 additions and 0 deletions
  1. 1 0
      shell/browser/api/electron_api_debugger.cc

+ 1 - 0
shell/browser/api/electron_api_debugger.cc

@@ -185,6 +185,7 @@ v8::Local<v8::Promise> Debugger::SendCommand(gin::Arguments* args) {
 void Debugger::ClearPendingRequests() {
   for (auto& it : pending_requests_)
     it.second.RejectWithErrorMessage("target closed while handling command");
+  pending_requests_.clear();
 }
 
 // static