WebCore:
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Sep 2007 20:43:50 +0000 (20:43 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Sep 2007 20:43:50 +0000 (20:43 +0000)
commitbdb0ff15a341e2c703cb3efc56b451caa020ddb1
tree25809799a63c56d426cf112444552fd373157409
parent3c5c975eec5d222e03b05b076205b9dc6221b972
WebCore:

        Reviewed by Darin.

        Changed the blocked exception log message to match AppKit's blocked exception message.

        * platform/mac/BlockExceptions.mm:
        (ReportBlockedObjCException):

WebKit:

        Reviewed by Darin.

        <rdar://problem/5443883> Uncaught Objective-C exceptions in WebKit clients lead to hard-to-diagnose crashes

        Changed all the direct delegate calls to use helper functions that have direct access to
        WebView's delegate objects. These helper methods will catch any ObjC exceptions and call
        ReportDiscardedDelegateException to log the discarded exception. WebView's that have
        catchesDelegateExceptions set to NO will not pay the cost of a @try/@catch. The delegate
        forwarders also have the same behavior.

        * Misc/WebKitLogging.h:
        * Misc/WebKitLogging.m:
        (ReportDiscardedDelegateException):
        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView loadPluginRequest:]):
        * Plugins/WebNullPluginView.mm:
        (-[WebNullPluginView viewDidMoveToWindow]):
        * WebCoreSupport/WebChromeClient.mm:
        (WebChromeClient::createWindow):
        (WebChromeClient::createModalDialog):
        (WebChromeClient::runModal):
        (WebChromeClient::toolbarsVisible):
        (WebChromeClient::statusbarVisible):
        (WebChromeClient::addMessageToConsole):
        (WebChromeClient::canRunBeforeUnloadConfirmPanel):
        (WebChromeClient::runBeforeUnloadConfirmPanel):
        (WebChromeClient::runJavaScriptAlert):
        (WebChromeClient::runJavaScriptConfirm):
        (WebChromeClient::runJavaScriptPrompt):
        (WebChromeClient::shouldInterruptJavaScript):
        (WebChromeClient::setStatusbarText):
        (WebChromeClient::print):
        * WebCoreSupport/WebContextMenuClient.mm:
        (WebContextMenuClient::getCustomMenuFromDefaultItems):
        (WebContextMenuClient::contextMenuItemSelected):
        * WebCoreSupport/WebDragClient.mm:
        (WebDragClient::startDrag):
        * WebCoreSupport/WebEditorClient.mm:
        (WebEditorClient::textFieldDidBeginEditing):
        (WebEditorClient::textFieldDidEndEditing):
        (WebEditorClient::textDidChangeInTextField):
        (WebEditorClient::doTextFieldCommandFromEvent):
        (WebEditorClient::textWillBeDeletedInTextField):
        (WebEditorClient::textDidChangeInTextArea):
        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge viewForPluginWithFrame:URL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
        (WebFrameLoaderClient::assignIdentifierToInitialRequest):
        (WebFrameLoaderClient::dispatchWillSendRequest):
        (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
        (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
        (WebFrameLoaderClient::dispatchDidReceiveResponse):
        (WebFrameLoaderClient::willCacheResponse):
        (WebFrameLoaderClient::dispatchDidReceiveContentLength):
        (WebFrameLoaderClient::dispatchDidFinishLoading):
        (WebFrameLoaderClient::dispatchDidFailLoading):
        (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
        (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
        (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
        (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
        (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
        (WebFrameLoaderClient::dispatchWillClose):
        (WebFrameLoaderClient::dispatchDidReceiveIcon):
        (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
        (WebFrameLoaderClient::dispatchDidReceiveTitle):
        (WebFrameLoaderClient::dispatchDidCommitLoad):
        (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
        (WebFrameLoaderClient::dispatchDidFailLoad):
        (WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
        (WebFrameLoaderClient::dispatchDidFinishLoad):
        (WebFrameLoaderClient::dispatchDidFirstLayout):
        (WebFrameLoaderClient::dispatchCreatePage):
        (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
        (WebFrameLoaderClient::dispatchWillSubmitForm):
        (WebFrameLoaderClient::dispatchDidLoadMainResource):
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView callDelegateDoCommandBySelectorIfNeeded:]):
        (-[WebHTMLView validateUserInterfaceItem:]):
        * WebView/WebPDFView.mm:
        (-[WebPDFView validateUserInterfaceItem:]):
        (-[WebPDFView PDFViewSavePDFToDownloadFolder:]):
        * WebView/WebView.mm:
        (-[WebView _openNewWindowWithRequest:]):
        (-[WebView _menuForElement:defaultItems:]):
        (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
        (-[WebView _cacheResourceLoadDelegateImplementations]):
        (-[WebView _cacheFrameLoadDelegateImplementations]):
        (-[WebView _policyDelegateForwarder]):
        (-[WebView _UIDelegateForwarder]):
        (-[WebView _editingDelegateForwarder]):
        (-[WebView _scriptDebugDelegateForwarder]):
        (-[WebView _setCatchesDelegateExceptions:]):
        (-[WebView _catchesDelegateExceptions]):
        (-[_WebSafeForwarder initWithTarget:defaultTarget:]):
        (-[_WebSafeForwarder forwardInvocation:]):
        (-[_WebSafeForwarder methodSignatureForSelector:]):
        (-[WebView _commonInitializationWithFrameName:groupName:]):
        (-[WebView validateUserInterfaceItem:]):
        (-[WebView _headerHeight]):
        (-[WebView _footerHeight]):
        (-[WebView _drawHeaderInRect:]):
        (-[WebView _drawFooterInRect:]):
        (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
        (CallDelegate):
        (CallDelegateReturningFloat):
        (CallDelegateReturningBoolean):
        (CallUIDelegate):
        (CallUIDelegateReturningFloat):
        (CallUIDelegateReturningBoolean):
        (CallFrameLoadDelegate):
        (CallResourceLoadDelegate):
        (CallFormDelegate):
        (CallFormDelegateReturningBoolean):
        * WebView/WebViewInternal.h:
        * WebView/WebViewPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
WebCore/ChangeLog
WebCore/platform/mac/BlockExceptions.mm
WebKit/ChangeLog
WebKit/Misc/WebKitLogging.h
WebKit/Misc/WebKitLogging.m
WebKit/Plugins/WebBaseNetscapePluginView.mm
WebKit/Plugins/WebNullPluginView.mm
WebKit/WebCoreSupport/WebChromeClient.mm
WebKit/WebCoreSupport/WebContextMenuClient.mm
WebKit/WebCoreSupport/WebDragClient.mm
WebKit/WebCoreSupport/WebEditorClient.mm
WebKit/WebCoreSupport/WebFrameBridge.mm
WebKit/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/WebView/WebHTMLView.mm
WebKit/WebView/WebPDFView.mm
WebKit/WebView/WebView.mm
WebKit/WebView/WebViewInternal.h
WebKit/WebView/WebViewPrivate.h