We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbb9bf9 commit 6782baaCopy full SHA for 6782baa
chromium/content/browser/web_contents/web_contents_impl.cc
@@ -3504,7 +3504,12 @@ void WebContentsImpl::ExitFullscreenMode(bool will_cause_resize) {
3504
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::ExitFullscreenMode",
3505
"will_cause_resize", will_cause_resize);
3506
if (delegate_) {
3507
+ // This may spin the message loop and destroy this object crbug.com/1506535
3508
+ base::WeakPtr<WebContentsImpl> weak_ptr = weak_factory_.GetWeakPtr();
3509
delegate_->ExitFullscreenModeForTab(this);
3510
+ if (!weak_ptr) {
3511
+ return;
3512
+ }
3513
3514
if (keyboard_lock_widget_)
3515
delegate_->CancelKeyboardLockRequest(this);
0 commit comments