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 6, 2016
1 parent 2282ec1 commit 02ef91f
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 @@ -959,6 +959,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

1 comment on commit 02ef91f

@bbondy
Copy link
Member

@bbondy bbondy commented on 02ef91f Sep 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

Please sign in to comment.