From 4ed7934567a5c758bcf72aaa090dce718c20e3f8 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 8 Aug 2014 12:45:26 +0800 Subject: [PATCH] mac: Close devtools when web contents is destroyed. After the BRYInspectableWebContentsView is added as subview to other NSWindow owned by users, the view_ would not be dealloc when the web contents got destroyed, which made the devtools window a ghost. --- brightray/browser/inspectable_web_contents_view_mac.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/brightray/browser/inspectable_web_contents_view_mac.mm b/brightray/browser/inspectable_web_contents_view_mac.mm index 698e6883a4..aeca189b79 100644 --- a/brightray/browser/inspectable_web_contents_view_mac.mm +++ b/brightray/browser/inspectable_web_contents_view_mac.mm @@ -17,6 +17,7 @@ InspectableWebContentsViewMac::InspectableWebContentsViewMac(InspectableWebConte } InspectableWebContentsViewMac::~InspectableWebContentsViewMac() { + CloseDevTools(); } gfx::NativeView InspectableWebContentsViewMac::GetNativeView() const {