Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Issue 2042123005: Revert of Address a crash under -[NSWindow close] via a WeakPtr PostTask from Browser::TabStripEmpty (Closed)

Created:
4 years, 6 months ago by tapted
Modified:
4 years, 6 months ago
Reviewers:
Robert Sesek
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Address a crash under -[NSWindow close] via a WeakPtr PostTask from Browser::TabStripEmpty() (patchset #6 id:100001 of https://codereview.chromium.org/2041213002/ ) Reason for revert: Fix didn't work. Original issue's description: > Address a crash under -[NSWindow close] via a WeakPtr PostTask from Browser::TabStripEmpty() > > This is the #1 browser crash for Mac in current Beta - 52.0.2743.24. The > stacks all have in common a Posted Task that's triggering -[NSWindow > close] via a base::WeakPtr<Browser>. This only happens via > Browser::TabStripEmpty(). > > The WeakPtr is only nerfed when BrowserWindowController's dealloc fully > completes. It seems plausible that this can be after the NSWindow's > dealloc fully completes, leading to an invalid access. One would hope > that [NSWindowController window] returns nil once the controlled window > is destroyed, but this seems to not be guaranteed. > > To (speculatively) fix, set a flag when the controlled window invokes > -[NSWindowController windowWillClose]. The window shouldn't be accessed > after this. Ensure the C++ BrowserWindowCocoa shim returns nil in this > case for the window, even if -[NSWindowController window] doesn't. > > See http://crbug.com/616701 > > Committed: https://crrev.com/7e91932ca0df94f1d3ebe9303e6ff31637751c17 > Cr-Commit-Position: refs/heads/master@{#398474} # Not skipping CQ checks because original CL landed more than 1 days ago. See http://crbug.com/616701 Committed: https://crrev.com/b59603cd2b5c7b00a47651b57516ef8e802af67b Cr-Commit-Position: refs/heads/master@{#399164}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -26 lines) Patch
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 2 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 4 chunks +8 lines, -18 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 12 (5 generated)
tapted
Created Revert of Address a crash under -[NSWindow close] via a WeakPtr PostTask from Browser::TabStripEmpty()
4 years, 6 months ago (2016-06-09 05:58:58 UTC) #1
Robert Sesek
lgtm
4 years, 6 months ago (2016-06-09 16:52:08 UTC) #3
tapted
Thanks Robert! (note I replaced the BUG= with a link in case it creates confusion ...
4 years, 6 months ago (2016-06-10 12:02:40 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2042123005/1
4 years, 6 months ago (2016-06-10 12:03:00 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 6 months ago (2016-06-10 12:40:50 UTC) #9
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-10 12:40:55 UTC) #10
commit-bot: I haz the power
4 years, 6 months ago (2016-06-10 12:42:33 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/b59603cd2b5c7b00a47651b57516ef8e802af67b
Cr-Commit-Position: refs/heads/master@{#399164}

Powered by Google App Engine
This is Rietveld 408576698