Uncatched NSExceptions should crash the web process
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Mar 2014 16:14:44 +0000 (16:14 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Mar 2014 16:14:44 +0000 (16:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=130923
<rdar://problem/16463751>

Reviewed by Dan Bernstein.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166452 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm

index 8892c8b..1911a3e 100644 (file)
@@ -1,3 +1,14 @@
+2014-03-28  Anders Carlsson  <andersca@apple.com>
+
+        Uncatched NSExceptions should crash the web process
+        https://bugs.webkit.org/show_bug.cgi?id=130923
+        <rdar://problem/16463751>
+
+        Reviewed by Dan Bernstein.
+
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess):
+
 2014-03-28  Csaba Osztrogon√°c  <ossy@webkit.org>
 
         Unreviewed buildfix after r166441 and r166443.
index 5865fc4..4c7e3e1 100644 (file)
@@ -188,6 +188,8 @@ void WebProcess::platformInitializeWebProcess(const WebProcessCreationParameters
     setEnhancedAccessibility(parameters.accessibilityEnhancedUserInterfaceEnabled);
 
 #if USE(APPKIT)
+    [[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSApplicationCrashOnExceptions" : @YES }];
+
     // rdar://9118639 accessibilityFocusedUIElement in NSApplication defaults to use the keyWindow. Since there's
     // no window in WK2, NSApplication needs to use the focused page's focused element.
     Method methodToPatch = class_getInstanceMethod([NSApplication class], @selector(accessibilityFocusedUIElement));