From 9237d40e095299956286326f2fcd6886d7e17539 Mon Sep 17 00:00:00 2001 From: "trop[bot]" Date: Sat, 25 Aug 2018 12:23:06 -0700 Subject: [PATCH] fix: issue 10962, crash when open devtool (backport: 3-0-x) (#14303) * fix: crash when opening devtool (#10962) * fix: fixed linting issues --- brightray/browser/inspectable_web_contents_impl.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index 32b5743b8db5..5e809552c6bf 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -735,6 +735,8 @@ void InspectableWebContentsImpl::WebContentsDestroyed() { for (const auto& pair : pending_requests_) delete pair.first; + pending_requests_.clear(); + if (view_ && view_->GetDelegate()) view_->GetDelegate()->DevToolsClosed(); }