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

Unified Diff: chrome/browser/cocoa/hung_renderer_controller.mm

Issue 151009: Removes the ability to close or resize the hung renderer dialog on Mac.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/hung_renderer_controller.mm
===================================================================
--- chrome/browser/cocoa/hung_renderer_controller.mm (revision 20024)
+++ chrome/browser/cocoa/hung_renderer_controller.mm (working copy)
@@ -51,13 +51,15 @@
if (hungContents_)
base::KillProcess(hungContents_->process()->process().handle(),
ResultCodes::HUNG, false);
- [[self window] performClose:nil];
+ // Cannot call performClose:, because the close button is disabled.
+ [self close];
}
- (IBAction)wait:(id)sender {
if (hungContents_ && hungContents_->render_view_host())
hungContents_->render_view_host()->RestartHangMonitorTimeout();
- [[self window] performClose:nil];
+ // Cannot call performClose:, because the close button is disabled.
+ [self close];
}
- (int)numberOfRowsInTableView:(NSTableView *)aTableView {
@@ -103,13 +105,7 @@
DCHECK(contents);
DCHECK(hungContents_);
if (hungContents_ && hungContents_->process() == contents->process()) {
- // If you switch tabs with the dialog open,
- // HungRendererDialog::EndForTabContents() is called after the
- // RWHV is hidden. performClose: runs a nested message loop,
- // during which the RWHV is drawn at least once, failing a DCHECK
- // that ensures it is never drawn while hidden. The workaround
- // here is to call close, which closes the window immediately with
- // no nested message loop.
+ // Cannot call performClose:, because the close button is disabled.
[self close];
}
}
« no previous file with comments | « chrome/app/nibs/en.lproj/HungRendererDialog.xib ('k') | chrome/browser/cocoa/hung_renderer_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698