Fix double free when closing window with devtools opened

This commit is contained in:
Cheng Zhao 2016-06-14 13:38:28 +09:00
parent 98eeadeb84
commit 8ebc34aeee

View file

@ -226,6 +226,7 @@ InspectableWebContentsImpl::InspectableWebContentsImpl(
} }
InspectableWebContentsImpl::~InspectableWebContentsImpl() { InspectableWebContentsImpl::~InspectableWebContentsImpl() {
Observe(nullptr);
} }
InspectableWebContentsView* InspectableWebContentsImpl::GetView() const { InspectableWebContentsView* InspectableWebContentsImpl::GetView() const {
@ -618,7 +619,6 @@ void InspectableWebContentsImpl::RenderFrameHostChanged(
void InspectableWebContentsImpl::WebContentsDestroyed() { void InspectableWebContentsImpl::WebContentsDestroyed() {
frontend_loaded_ = false; frontend_loaded_ = false;
Observe(nullptr);
Detach(); Detach();
for (const auto& pair : pending_requests_) for (const auto& pair : pending_requests_)