Reviewed by Sam Weinig.
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Dec 2007 03:18:21 +0000 (03:18 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Dec 2007 03:18:21 +0000 (03:18 +0000)
commitd72355a5ae6482cfa10164926641c7ce2a5ea692
treefa45dfb607ee2f216821fac0b4e19a7635cdea31
parentdac2867bf571ef96d6f5200567bd922b684c91ef
    Reviewed by Sam Weinig.

        - fix http://bugs.webkit.org/show_bug.cgi?id=16332
          ObjC DOM exception object descriptions should include the exception name

        * WebCore.pro: Added ExceptionCode.cpp.
        * WebCore.vcproj/WebCore.vcproj: Added ExceptionCode.cpp.
        * WebCore.xcodeproj/project.pbxproj: Added ExceptionCode.cpp.
        * WebCoreSources.bkl: Added ExceptionCode.cpp.

        * bindings/js/kjs_binding.cpp: (KJS::setDOMException): Moved the code to decompose an
        ExceptionCode into ExceptionCode.h/cpp -- getExceptionCodeDescription. Also removed
        the many unneeded includes that were here. Had to keep one special case here, for
        SECURITY_ERR.

        * bindings/objc/ExceptionHandlers.mm: (WebCore::raiseDOMException): Changed to use the
        new getExceptionCodeDescription function so that this shares the exception name
        information that was previously only available to JavaScript.

        * dom/ExceptionCode.cpp: Copied from bindings/js/kjs_binding.cpp.
        (WebCore::getExceptionCodeDescription): Added some assertions, and made the function
        handle exception names in a slightly more robust way that is not subject to integer
        overflow. (Not a real world issue since we should never receive a bad exception code.)

        * dom/ExceptionCode.h: Added the ExceptionCodeDescription struct and the
        getExceptionCodeDescription function.

        * svg/SVGException.h: Added a missing #include and got rid of some comments. Some of
        the comments were mildly helpful, but others were incorrect. This now matches the other
        exception-related headers such as RangeException.h.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/WebCoreSources.bkl
WebCore/bindings/js/kjs_binding.cpp
WebCore/bindings/objc/ExceptionHandlers.mm
WebCore/dom/ExceptionCode.cpp [new file with mode: 0644]
WebCore/dom/ExceptionCode.h
WebCore/svg/SVGException.h