Uncatched NSExceptions should crash the web process
<rdar://problem/16463751>
Created attachment 228101 [details] Patch
Comment on attachment 228101 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=228101&action=review > Source/WebKit2/ChangeLog:3 > + Uncatched NSExceptions should crash the web process Uncaught > Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm:191 > + [[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSApplicationCrashOnExceptions" : @YES }]; What is the behavior in the non-AppKit configuration? Does it already crash on exceptions? Can we make it crash on exceptions?
(In reply to comment #3) > (From update of attachment 228101 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=228101&action=review > > > Source/WebKit2/ChangeLog:3 > > + Uncatched NSExceptions should crash the web process > > Uncaught > > > Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm:191 > > + [[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSApplicationCrashOnExceptions" : @YES }]; > > What is the behavior in the non-AppKit configuration? Does it already crash on exceptions? Can we make it crash on exceptions? I think we can use std::set_terminate to set the exception handler, but I'm not sure if it's possible to get the exception (or stack trace) from there.
Committed r166452: <http://trac.webkit.org/changeset/166452>
(In reply to comment #4) > (In reply to comment #3) > > (From update of attachment 228101 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=228101&action=review > > > > > Source/WebKit2/ChangeLog:3 > > > + Uncatched NSExceptions should crash the web process > > > > Uncaught > > > > > Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm:191 > > > + [[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSApplicationCrashOnExceptions" : @YES }]; > > > > What is the behavior in the non-AppKit configuration? Does it already crash on exceptions? Can we make it crash on exceptions? > > I think we can use std::set_terminate to set the exception handler, but I'm not sure if it's possible to get the exception (or stack trace) from there. I was thinking along the lines of using NSSetUncaughtExceptionHandler().