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

Issue 2056593002: Mac: Retain the child NSWindow in WidgetOwnerNSWindowAdapter before invoking close (Closed)

Created:
4 years, 6 months ago by tapted
Modified:
4 years, 6 months ago
Reviewers:
Robert Sesek
CC:
chromium-reviews, tfarina, 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

Mac: Retain the child NSWindow in WidgetOwnerNSWindowAdapter before invoking close AppKit has gotten better at handling the last reference to an NSWindow going away inside -[NSWindow close]. However, on 10.9, bad things can happen if we don't retain the NSWindow being closed until after the -[NSWindow close] call returns. WidgetOwnerNSWindowAdapter::OnWindowWillClose() wasn't doing this. The result: in some codepaths, a zombie access under the close call. To fix, retain the window being closed. BUG=616701 TEST=On OSX 10.9, have one browser tab, navigate to a page (e.g. chrome://version), then press Backspace. The "Press Cmd+Left to go back" bubble should appear. Wait for it to fade out completely. Then close the tab via the tabstrip. Chrome shouldn't crash. Committed: https://crrev.com/6777bcc56aff3a1dc27fb0adced9a462b22e4e33 Cr-Commit-Position: refs/heads/master@{#398890}

Patch Set 1 #

Patch Set 2 : Refine DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -6 lines) Patch
M ui/views/cocoa/native_widget_mac_nswindow.mm View 1 chunk +6 lines, -0 lines 0 comments Download
M ui/views/cocoa/widget_owner_nswindow_adapter.mm View 1 1 chunk +15 lines, -1 line 0 comments Download
M ui/views/widget/native_widget_mac_unittest.mm View 9 chunks +69 lines, -5 lines 0 comments Download

Messages

Total messages: 16 (8 generated)
tapted
Pretty sure this will fix it!
4 years, 6 months ago (2016-06-09 02:02:00 UTC) #3
tapted
On 2016/06/09 02:02:00, tapted wrote: > Pretty sure this will fix it! And it looks ...
4 years, 6 months ago (2016-06-09 02:45:19 UTC) #4
tapted
On 2016/06/09 02:45:19, tapted wrote: > On 2016/06/09 02:02:00, tapted wrote: > > Pretty sure ...
4 years, 6 months ago (2016-06-09 03:49:15 UTC) #6
Robert Sesek
lgtm
4 years, 6 months ago (2016-06-09 15:03:23 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2056593002/20001
4 years, 6 months ago (2016-06-09 15:03:50 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-09 15:25:49 UTC) #13
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-09 15:25:56 UTC) #14
commit-bot: I haz the power
4 years, 6 months ago (2016-06-09 15:26:58 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/6777bcc56aff3a1dc27fb0adced9a462b22e4e33
Cr-Commit-Position: refs/heads/master@{#398890}

Powered by Google App Engine
This is Rietveld 408576698