-
Trent Apted authored
Currently BrowserWindowController and BrowserFrameMac set some delegates on the NSWindow object during construction for validating and dispatching commands in the mainMenu bar (and other means). These are not cleared upon destruction. However, AppKit may retain NSWindows on NSEvents and things, resulting in validation or dispatch attempts attempting to lookup a Browser* for the window and finding null. This CL adds plumbing in MacViews so that the NSWindow customisation done at construction has a symmetric destruction opportunity as well. Adds some test coverage to simulate the codepath that currently DCHECKs that covers both Views and Cocoa browser windows. Bug: 828738 Change-Id: I96f69c7912328abf84076f202c98617f4729f38a Reviewed-on: https://chromium-review.googlesource.com/1068906Reviewed-by:
Elly Fong-Jones <ellyjones@chromium.org> Commit-Queue: Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#561322}
898f8f0c