Destroy web contents when window is closed.
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.
This commit is contained in:
parent
4880096f3d
commit
e3118359ad
3 changed files with 4 additions and 2 deletions
|
@ -449,6 +449,9 @@ void NativeWindow::MoveContents(content::WebContents* source,
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindow::CloseContents(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
|
// When the web contents is gone, close the window immediately, but the
|
||||||
// memory will not be freed until you call delete.
|
// memory will not be freed until you call delete.
|
||||||
// In this way, it would be safe to manage windows via smart pointers. If you
|
// In this way, it would be safe to manage windows via smart pointers. If you
|
||||||
|
|
|
@ -241,7 +241,6 @@ void NativeWindowMac::Close() {
|
||||||
|
|
||||||
void NativeWindowMac::CloseImmediately() {
|
void NativeWindowMac::CloseImmediately() {
|
||||||
[window_ close];
|
[window_ close];
|
||||||
window_.reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindowMac::Move(const gfx::Rect& pos) {
|
void NativeWindowMac::Move(const gfx::Rect& pos) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import sys
|
||||||
|
|
||||||
NODE_VERSION = 'v0.11.13'
|
NODE_VERSION = 'v0.11.13'
|
||||||
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
|
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
|
||||||
LIBCHROMIUMCONTENT_COMMIT = 'dcd011c56f1e19885bac78ca58a397b0c5c25265'
|
LIBCHROMIUMCONTENT_COMMIT = '61d53e9631625fa8e5d5043aabea18b96ed6a950'
|
||||||
|
|
||||||
ARCH = {
|
ARCH = {
|
||||||
'cygwin': '32bit',
|
'cygwin': '32bit',
|
||||||
|
|
Loading…
Add table
Reference in a new issue