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

Unified Diff: content/app/mac/mac_init.mm

Issue 2112553009: mac: Crash on uncaught Objective-C exceptions routed to NSApplication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self-review Created 4 years, 6 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
« no previous file with comments | « chrome/browser/chrome_browser_main_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/mac/mac_init.mm
diff --git a/content/app/mac/mac_init.mm b/content/app/mac/mac_init.mm
index 042663c76743330e0ee20cd3c0108ecba1e7dd56..eea835a02a321e769a7ac500b1e647bf573d9dbf 100644
--- a/content/app/mac/mac_init.mm
+++ b/content/app/mac/mac_init.mm
@@ -4,7 +4,7 @@
#include "content/app/mac/mac_init.h"
-#include <Cocoa/Cocoa.h>
+#import <Cocoa/Cocoa.h>
#include "base/mac/mac_util.h"
@@ -12,7 +12,16 @@
void InitializeMac() {
[[NSUserDefaults standardUserDefaults] registerDefaults:@{
+ // Exceptions routed to -[NSApplication reportException:] should crash
+ // immediately, as opposed being swallowed or presenting UI that gives the
+ // user a choice in the matter.
+ @"NSApplicationCrashOnExceptions": @YES,
+
+ // Prevent Cocoa from turning command-line arguments into -[NSApplication
+ // application:openFile:], because they are handled directly. @"NO" looks
+ // like a mistake, but the value really is supposed to be a string.
@"NSTreatUnknownArgumentsAsOpen": @"NO",
+
// CoreAnimation has poor performance and CoreAnimation and
// non-CoreAnimation exhibit window flickering when layers are not hosted
// in the window server, which is the default when not not using the
« no previous file with comments | « chrome/browser/chrome_browser_main_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698