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

Issue 2375903002: Emit OnNativeWidgetDestroying() before clearing the NSWindowDelegate. (Closed)

Created:
4 years, 2 months ago by yamaxim
Modified:
4 years, 2 months ago
Reviewers:
tapted, sky
CC:
chromium-reviews, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Emit OnNativeWidgetDestroying() before clearing the NSWindowDelegate. Currently the NSWindowDelegate is cleared beforehand, which means observers of OnWidgetDestroying() are unable to use GetWidgetForNativeWindow(). This is a problem during closure of the browser window because inactive tabs are reattached when they become active due to the active tab being closed. This results in a DCHECK in NativeViewHostMac::AttachNativeView(). To fix, clear the NSWindowDelegate in the method BridgedNativeWidget calls on NativeWidgetMac which deletes the BridgedNativeWidget instance (i.e. just after emitting OnNativeWidgetDestroying()). R=tapted@chromium.org BUG=604628 Committed: https://crrev.com/f7941c454c74e229cedc6b3aed96bee9b3f22e68 Cr-Commit-Position: refs/heads/master@{#423676}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Move reseting NSWindow delegate to NativeWidgetMac #

Total comments: 2

Patch Set 3 : Add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M ui/views/cocoa/bridged_native_widget.mm View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M ui/views/widget/native_widget_mac.mm View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/widget/widget_unittest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 31 (11 generated)
yamaxim
4 years, 2 months ago (2016-09-28 09:34:50 UTC) #1
tapted
Can you file a BUG? it's not clear from the CL description where the crash ...
4 years, 2 months ago (2016-09-29 07:10:03 UTC) #2
yamaxim
On 2016/09/29 07:10:03, tapted wrote: > Can you file a BUG? it's not clear from ...
4 years, 2 months ago (2016-09-29 07:55:03 UTC) #3
yamaxim
4 years, 2 months ago (2016-09-29 07:55:24 UTC) #4
tapted
Please file a bug. Ideally, the bug + CL description should be enough to convince ...
4 years, 2 months ago (2016-09-29 23:12:47 UTC) #5
yamaxim
On 2016/09/29 23:12:47, tapted wrote: > Please file a bug. > > Ideally, the bug ...
4 years, 2 months ago (2016-09-30 14:29:21 UTC) #7
yamaxim
4 years, 2 months ago (2016-09-30 14:30:03 UTC) #8
tapted
Make sure your CL description follows the guide at https://www.chromium.org/developers/contributing-code#TOC-Writing-change-list-descriptions You need to mention - ...
4 years, 2 months ago (2016-10-05 08:38:19 UTC) #9
tapted
Maybe have a look at the experiments I'm doing in https://codereview.chromium.org/2393843002 The main point is ...
4 years, 2 months ago (2016-10-05 10:43:56 UTC) #10
yamaxim
4 years, 2 months ago (2016-10-05 13:28:45 UTC) #12
tapted
neat! I like it. But it's still difficult to grasp the core problem from the ...
4 years, 2 months ago (2016-10-06 08:36:06 UTC) #13
yamaxim
https://codereview.chromium.org/2375903002/diff/20001/ui/views/cocoa/bridged_native_widget.mm File ui/views/cocoa/bridged_native_widget.mm (right): https://codereview.chromium.org/2375903002/diff/20001/ui/views/cocoa/bridged_native_widget.mm#newcode711 ui/views/cocoa/bridged_native_widget.mm:711: native_widget_mac_->OnWindowWillClose(); On 2016/10/06 08:36:05, tapted wrote: > Since it's ...
4 years, 2 months ago (2016-10-06 09:33:09 UTC) #17
tapted
lgtm
4 years, 2 months ago (2016-10-06 09:34:36 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2375903002/40001
4 years, 2 months ago (2016-10-06 09:35:46 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/275175)
4 years, 2 months ago (2016-10-06 09:45:09 UTC) #22
yamaxim
4 years, 2 months ago (2016-10-06 09:51:31 UTC) #24
sky
LGTM
4 years, 2 months ago (2016-10-06 19:50:27 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2375903002/40001
4 years, 2 months ago (2016-10-06 20:58:44 UTC) #27
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-10-06 21:06:10 UTC) #29
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 21:08:42 UTC) #31
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f7941c454c74e229cedc6b3aed96bee9b3f22e68
Cr-Commit-Position: refs/heads/master@{#423676}

Powered by Google App Engine
This is Rietveld 408576698