Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
destroy memory pressure listener if webcontents is destroyed
Browse files Browse the repository at this point in the history
possible fix for brave/browser-laptop#3775
auditors @bbondy
  • Loading branch information
bridiver committed Sep 16, 2016
1 parent 17d20ff commit 4ae8bb5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions atom/browser/api/atom_api_web_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,7 @@ bool WebContents::OnMessageReceived(const IPC::Message& message) {
// be destroyed on close, and WebContentsDestroyed would be called for it, so
// we need to make sure the api::WebContents is also deleted.
void WebContents::WebContentsDestroyed() {
memory_pressure_listener_.reset();
// clear out fullscreen state
if (CommonWebContentsDelegate::IsFullscreenForTabOrPending(web_contents())) {
ExitFullscreenModeForTab(web_contents());
Expand Down

0 comments on commit 4ae8bb5

Please sign in to comment.