]> khamidou — GitHub mirrors - electron.git/commitdiff
Destroy web contents when window is closed.
authorCheng Zhao <zcbenz@gmail.com>
Mon, 4 Aug 2014 06:55:08 +0000 (14:55 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 4 Aug 2014 06:55:08 +0000 (14:55 +0800)
Previously this was reverted because of Chromium's spammy error
loggings, but it also causes the renderer process not to exit when the
page has been closed. After fixing the spammy error logging, we can now
bring this back.

Fixes atom/atom#3141.

atom/browser/native_window.cc
atom/browser/native_window_mac.mm
script/lib/config.py

index 5481bfa1d67c79c381677349b2c7f97339288b84..ca3e8789f2941294b171ee3f536abc9cea8cb415 100644 (file)
@@ -449,6 +449,9 @@ void NativeWindow::MoveContents(content::WebContents* source,
 }
 
 void NativeWindow::CloseContents(content::WebContents* source) {
+  // Destroy the WebContents before we close the window.
+  DestroyWebContents();
+
   // When the web contents is gone, close the window immediately, but the
   // memory will not be freed until you call delete.
   // In this way, it would be safe to manage windows via smart pointers. If you
index f2ff9b2235d8bd7755eba393ab1e47996185fff5..cac5d63e02022d4766673c9c48201d8b683a687e 100644 (file)
@@ -241,7 +241,6 @@ void NativeWindowMac::Close() {
 
 void NativeWindowMac::CloseImmediately() {
   [window_ close];
-  window_.reset();
 }
 
 void NativeWindowMac::Move(const gfx::Rect& pos) {
index dda01b0bec9af22245b9ff1fa5ad794eefac26d5..b28eebe77b4283fe7f9e6b301bfc099a43a23409 100644 (file)
@@ -5,7 +5,7 @@ import sys
 
 NODE_VERSION = 'v0.11.13'
 BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
-LIBCHROMIUMCONTENT_COMMIT = 'dcd011c56f1e19885bac78ca58a397b0c5c25265'
+LIBCHROMIUMCONTENT_COMMIT = '61d53e9631625fa8e5d5043aabea18b96ed6a950'
 
 ARCH = {
     'cygwin': '32bit',