Commit 09e98735 authored by spqchan's avatar spqchan Committed by Commit Bot

[Mac] Fix for BrowserWindowTouchBar crash

Currently when BrowserTouchBarNotificationBridge is
destroyed, it will try to update the touch bar buttons,
which might have been destroyed.

This CL fixes the issue by having it just remove the
observer.

Bug: 852222
Change-Id: I8eae99985ea21c5b9f6ea5a3ffdf3998b80394e9
Reviewed-on: https://chromium-review.googlesource.com/1099483Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Sarah Chan <spqchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566970}
parent 9e6471cb
......@@ -151,7 +151,8 @@ class BrowserTouchBarNotificationBridge : public CommandObserver,
if (model)
model->RemoveObserver(this);
UpdateWebContents(nullptr);
if (contents_)
BookmarkTabHelper::FromWebContents(contents_)->RemoveObserver(this);
}
void UpdateTouchBar() { [owner_ invalidateTouchBar]; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment