Changeset 29058 in webkit


Ignore:
Timestamp:
Dec 31, 2007 7:04:16 PM (16 years ago)
Author:
weinig@apple.com
Message:

WebCore:

Reviewed by Darin.

Patch for http://bugs.webkit.org/show_bug.cgi?id=16637
Acid3 expects ExeceptionCode constants to be defined on DOMException objects

  • Make DOMException a real JS object.

Test: fast/dom/DOMException/prototype-object.html

  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:

This is no longer needed as the autogenerated classes now includes the
constructor.

  • bindings/js/JSDOMExceptionConstructor.cpp: Removed.
  • bindings/js/JSDOMExceptionConstructor.h: Removed.

Create on demand and use the new class for DOMExceptions.

  • bindings/js/kjs_binding.cpp: (KJS::setDOMException):

Remove no longer needed custom constructor getter.

  • bindings/js/kjs_window.cpp: (KJS::Window::getValueProperty):

Don't expose DOMCoreException as the name of class by special casing
the user visible class name to be DOMException.

  • bindings/scripts/CodeGeneratorJS.pm:

The DOMException class/file needs to be named DOMCoreException because there is
name conflict with one of the Objective-C bindings classes. It should be renamed
to DOMException when the Objective-C bindings are moved into WebKit.

  • dom/DOMCoreException.cpp: Added. (WebCore::DOMCoreException::DOMCoreException): (WebCore::DOMCoreException::toString):
  • dom/DOMCoreException.h: Added. (WebCore::DOMCoreException::): (WebCore::DOMCoreException::code): (WebCore::DOMCoreException::name): (WebCore::DOMCoreException::message):
  • dom/DOMCoreException.idl: Added.
  • page/DOMWindow.idl:

LayoutTests:

Reviewed by Darin.

Test for http://bugs.webkit.org/show_bug.cgi?id=16637
Acid3 expects ExeceptionCode constants to be defined on DOMException objects

  • fast/dom/DOMException: Added.
  • fast/dom/DOMException/prototype-object-expected.txt: Added.
  • fast/dom/DOMException/prototype-object.html: Added.
  • fast/dom/DOMException/resources: Added.
  • fast/dom/DOMException/resources/prototype-object.js: Added.
  • fast/dom/Window/window-properties-expected.txt:
  • http/tests/xmlhttprequest/connection-error-sync-expected.txt:
Location:
trunk
Files:
8 added
2 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r29056 r29058  
     12007-12-31  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Darin.
     4
     5        Test for http://bugs.webkit.org/show_bug.cgi?id=16637
     6        Acid3 expects ExeceptionCode constants to be defined on DOMException objects
     7
     8        * fast/dom/DOMException: Added.
     9        * fast/dom/DOMException/prototype-object-expected.txt: Added.
     10        * fast/dom/DOMException/prototype-object.html: Added.
     11        * fast/dom/DOMException/resources: Added.
     12        * fast/dom/DOMException/resources/prototype-object.js: Added.
     13        * fast/dom/Window/window-properties-expected.txt:
     14        * http/tests/xmlhttprequest/connection-error-sync-expected.txt:
     15
    1162007-12-31  Darin Adler  <darin@apple.com>
    217
  • trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt

    r29051 r29058  
    269269window.Counter.prototype [object CounterPrototype]
    270270window.DOMException [object DOMExceptionConstructor]
     271window.DOMException.DOMSTRING_SIZE_ERR [number]
     272window.DOMException.HIERARCHY_REQUEST_ERR [number]
     273window.DOMException.INDEX_SIZE_ERR [number]
     274window.DOMException.INUSE_ATTRIBUTE_ERR [number]
     275window.DOMException.INVALID_ACCESS_ERR [number]
     276window.DOMException.INVALID_CHARACTER_ERR [number]
     277window.DOMException.INVALID_MODIFICATION_ERR [number]
     278window.DOMException.INVALID_STATE_ERR [number]
     279window.DOMException.NAMESPACE_ERR [number]
     280window.DOMException.NOT_FOUND_ERR [number]
     281window.DOMException.NOT_SUPPORTED_ERR [number]
     282window.DOMException.NO_DATA_ALLOWED_ERR [number]
     283window.DOMException.NO_MODIFICATION_ALLOWED_ERR [number]
     284window.DOMException.SYNTAX_ERR [number]
     285window.DOMException.TYPE_MISMATCH_ERR [number]
     286window.DOMException.VALIDATION_ERR [number]
     287window.DOMException.WRONG_DOCUMENT_ERR [number]
     288window.DOMException.prototype [object DOMExceptionPrototype]
     289window.DOMException.prototype.DOMSTRING_SIZE_ERR [number]
     290window.DOMException.prototype.HIERARCHY_REQUEST_ERR [number]
     291window.DOMException.prototype.INDEX_SIZE_ERR [number]
     292window.DOMException.prototype.INUSE_ATTRIBUTE_ERR [number]
     293window.DOMException.prototype.INVALID_ACCESS_ERR [number]
     294window.DOMException.prototype.INVALID_CHARACTER_ERR [number]
     295window.DOMException.prototype.INVALID_MODIFICATION_ERR [number]
     296window.DOMException.prototype.INVALID_STATE_ERR [number]
     297window.DOMException.prototype.NAMESPACE_ERR [number]
     298window.DOMException.prototype.NOT_FOUND_ERR [number]
     299window.DOMException.prototype.NOT_SUPPORTED_ERR [number]
     300window.DOMException.prototype.NO_DATA_ALLOWED_ERR [number]
     301window.DOMException.prototype.NO_MODIFICATION_ALLOWED_ERR [number]
     302window.DOMException.prototype.SYNTAX_ERR [number]
     303window.DOMException.prototype.TYPE_MISMATCH_ERR [number]
     304window.DOMException.prototype.VALIDATION_ERR [number]
     305window.DOMException.prototype.WRONG_DOCUMENT_ERR [number]
    271306window.DOMImplementation [object DOMImplementationConstructor]
    272307window.DOMImplementation.prototype [object DOMImplementationPrototype]
  • trunk/LayoutTests/http/tests/xmlhttprequest/connection-error-sync-expected.txt

    r18863 r29058  
    11Test the behavior of a sync XMLHttpRequest that encounters an infinite redirection loop.
    22
    3 Exception Error; code=101; number=undefined (0); message='NETWORK_ERR: XMLHttpRequest Exception 101'
     3Exception NETWORK_ERR; code=101; number=undefined (0); message='NETWORK_ERR: XMLHttpRequest Exception 101'
  • trunk/WebCore/ChangeLog

    r29057 r29058  
     12007-12-31  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Darin.
     4
     5        Patch for http://bugs.webkit.org/show_bug.cgi?id=16637
     6        Acid3 expects ExeceptionCode constants to be defined on DOMException objects
     7
     8        - Make DOMException a real JS object.
     9
     10        Test: fast/dom/DOMException/prototype-object.html
     11
     12        * DerivedSources.make:
     13        * WebCore.xcodeproj/project.pbxproj:
     14
     15        This is no longer needed as the autogenerated classes now includes the
     16        constructor.
     17        * bindings/js/JSDOMExceptionConstructor.cpp: Removed.
     18        * bindings/js/JSDOMExceptionConstructor.h: Removed.
     19
     20        Create on demand and use the new class for DOMExceptions.
     21        * bindings/js/kjs_binding.cpp:
     22        (KJS::setDOMException):
     23
     24        Remove no longer needed custom constructor getter.
     25        * bindings/js/kjs_window.cpp:
     26        (KJS::Window::getValueProperty):
     27
     28        Don't expose DOMCoreException as the name of class by special casing
     29        the user visible class name to be DOMException.
     30        * bindings/scripts/CodeGeneratorJS.pm:
     31
     32        The DOMException class/file needs to be named DOMCoreException because there is
     33        name conflict with one of the Objective-C bindings classes.  It should be renamed
     34        to DOMException when the Objective-C bindings are moved into WebKit.
     35        * dom/DOMCoreException.cpp: Added.
     36        (WebCore::DOMCoreException::DOMCoreException):
     37        (WebCore::DOMCoreException::toString):
     38        * dom/DOMCoreException.h: Added.
     39        (WebCore::DOMCoreException::):
     40        (WebCore::DOMCoreException::code):
     41        (WebCore::DOMCoreException::name):
     42        (WebCore::DOMCoreException::message):
     43        * dom/DOMCoreException.idl: Added.
     44        * page/DOMWindow.idl:
     45
    1462007-12-31  Sam Weinig  <sam@webkit.org>
    247
  • trunk/WebCore/DerivedSources.make

    r29051 r29058  
    333333    JSCounter.h \
    334334    JSCSSStyleDeclaration.h \
    335     JSDatabase.h \
     335    JSDOMCoreException.h \
    336336    JSDOMExceptionConstructor.lut.h \
    337337    JSDOMImplementation.h \
     
    339339    JSDOMSelection.h \
    340340    JSDOMWindow.h \
     341    JSDatabase.h \
    341342    JSDocument.h \
    342343    JSDocumentFragment.h \
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r29051 r29058  
    31613161                B27B28290CEF0C0700D39D54 /* JSSVGMissingGlyphElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27B28230CEF0C0700D39D54 /* JSSVGMissingGlyphElement.cpp */; };
    31623162                B27B282A0CEF0C0700D39D54 /* JSSVGMissingGlyphElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B27B28240CEF0C0700D39D54 /* JSSVGMissingGlyphElement.h */; };
    3163                 B27B28360CEF0C3600D39D54 /* CSSPropertyNames.in in Resources */ = {isa = PBXBuildFile; fileRef = B27B282B0CEF0C3500D39D54 /* CSSPropertyNames.in */; };
    3164                 B27B28370CEF0C3600D39D54 /* CSSValueKeywords.in in Resources */ = {isa = PBXBuildFile; fileRef = B27B282C0CEF0C3500D39D54 /* CSSValueKeywords.in */; };
    31653163                B27B28380CEF0C3600D39D54 /* DOMSVGFontElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B27B282D0CEF0C3500D39D54 /* DOMSVGFontElement.h */; settings = {ATTRIBUTES = (); }; };
    31663164                B27B28390CEF0C3600D39D54 /* DOMSVGFontElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = B27B282E0CEF0C3500D39D54 /* DOMSVGFontElement.mm */; };
     
    36233621                BC5A86B50C3367E800EEA649 /* JSDOMSelection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC5A86B30C3367E800EEA649 /* JSDOMSelection.cpp */; };
    36243622                BC5A86B60C3367E800EEA649 /* JSDOMSelection.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5A86B40C3367E800EEA649 /* JSDOMSelection.h */; };
     3623                BC60D6E90D28D83400B9918F /* DOMCoreException.h in Headers */ = {isa = PBXBuildFile; fileRef = BC60D6E80D28D83400B9918F /* DOMCoreException.h */; };
     3624                BC60D6EC0D28D99900B9918F /* DOMCoreException.idl in Resources */ = {isa = PBXBuildFile; fileRef = BC60D6EB0D28D99900B9918F /* DOMCoreException.idl */; };
     3625                BC60D7C00D29A46300B9918F /* JSDOMCoreException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC60D7BE0D29A46300B9918F /* JSDOMCoreException.cpp */; };
     3626                BC60D7C10D29A46300B9918F /* JSDOMCoreException.h in Headers */ = {isa = PBXBuildFile; fileRef = BC60D7BF0D29A46300B9918F /* JSDOMCoreException.h */; };
     3627                BC60D8040D29A9E800B9918F /* DOMCoreException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC60D8030D29A9E800B9918F /* DOMCoreException.cpp */; };
    36253628                BC64B4CB0CB4295D005F2B62 /* CachedFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC64B4C90CB4295D005F2B62 /* CachedFont.cpp */; };
    36263629                BC64B4CC0CB4295D005F2B62 /* CachedFont.h in Headers */ = {isa = PBXBuildFile; fileRef = BC64B4CA0CB4295D005F2B62 /* CachedFont.h */; };
     
    37363739                BCD9C2640C17AA67005C90A2 /* JSNodeCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C2600C17AA67005C90A2 /* JSNodeCustom.cpp */; };
    37373740                BCD9C2650C17AA67005C90A2 /* JSNodeListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C2610C17AA67005C90A2 /* JSNodeListCustom.cpp */; };
    3738                 BCD9C26E0C17AA81005C90A2 /* JSDOMExceptionConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C2680C17AA81005C90A2 /* JSDOMExceptionConstructor.cpp */; };
    3739                 BCD9C26F0C17AA81005C90A2 /* JSDOMExceptionConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD9C2690C17AA81005C90A2 /* JSDOMExceptionConstructor.h */; };
    37403741                BCD9C2700C17AA81005C90A2 /* JSEventTargetNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C26A0C17AA81005C90A2 /* JSEventTargetNode.cpp */; };
    37413742                BCD9C2710C17AA81005C90A2 /* JSEventTargetNode.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD9C26B0C17AA81005C90A2 /* JSEventTargetNode.h */; };
     
    72147215                B27B28230CEF0C0700D39D54 /* JSSVGMissingGlyphElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGMissingGlyphElement.cpp; sourceTree = "<group>"; };
    72157216                B27B28240CEF0C0700D39D54 /* JSSVGMissingGlyphElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSSVGMissingGlyphElement.h; sourceTree = "<group>"; };
    7216                 B27B282B0CEF0C3500D39D54 /* CSSPropertyNames.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSPropertyNames.in; sourceTree = "<group>"; };
    7217                 B27B282C0CEF0C3500D39D54 /* CSSValueKeywords.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSValueKeywords.in; sourceTree = "<group>"; };
    72187217                B27B282D0CEF0C3500D39D54 /* DOMSVGFontElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGFontElement.h; sourceTree = "<group>"; };
    72197218                B27B282E0CEF0C3500D39D54 /* DOMSVGFontElement.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMSVGFontElement.mm; sourceTree = "<group>"; };
     
    76807679                BC5A86B40C3367E800EEA649 /* JSDOMSelection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDOMSelection.h; sourceTree = "<group>"; };
    76817680                BC5EC1760A507E3E006007F5 /* view-source.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "view-source.css"; sourceTree = "<group>"; };
     7681                BC60D6E80D28D83400B9918F /* DOMCoreException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMCoreException.h; sourceTree = "<group>"; };
     7682                BC60D6EB0D28D99900B9918F /* DOMCoreException.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMCoreException.idl; sourceTree = "<group>"; };
     7683                BC60D7BE0D29A46300B9918F /* JSDOMCoreException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMCoreException.cpp; sourceTree = "<group>"; };
     7684                BC60D7BF0D29A46300B9918F /* JSDOMCoreException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMCoreException.h; sourceTree = "<group>"; };
     7685                BC60D8030D29A9E800B9918F /* DOMCoreException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMCoreException.cpp; sourceTree = "<group>"; };
    76827686                BC64B4C90CB4295D005F2B62 /* CachedFont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedFont.cpp; sourceTree = "<group>"; };
    76837687                BC64B4CA0CB4295D005F2B62 /* CachedFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedFont.h; sourceTree = "<group>"; };
     
    77987802                BCD9C2600C17AA67005C90A2 /* JSNodeCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeCustom.cpp; sourceTree = "<group>"; };
    77997803                BCD9C2610C17AA67005C90A2 /* JSNodeListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeListCustom.cpp; sourceTree = "<group>"; };
    7800                 BCD9C2680C17AA81005C90A2 /* JSDOMExceptionConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMExceptionConstructor.cpp; sourceTree = "<group>"; };
    7801                 BCD9C2690C17AA81005C90A2 /* JSDOMExceptionConstructor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDOMExceptionConstructor.h; sourceTree = "<group>"; };
    78027804                BCD9C26A0C17AA81005C90A2 /* JSEventTargetNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSEventTargetNode.cpp; sourceTree = "<group>"; };
    78037805                BCD9C26B0C17AA81005C90A2 /* JSEventTargetNode.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSEventTargetNode.h; sourceTree = "<group>"; };
     
    93019303                        isa = PBXGroup;
    93029304                        children = (
    9303                                 B27B282B0CEF0C3500D39D54 /* CSSPropertyNames.in */,
    9304                                 B27B282C0CEF0C3500D39D54 /* CSSValueKeywords.in */,
    93059305                                85967D9F0AA8BB59005FEDEE /* Core */,
    93069306                                85967DCA0AA8BF0F005FEDEE /* CSS */,
     
    1057810578                        isa = PBXGroup;
    1057910579                        children = (
     10580                                BC60D7BE0D29A46300B9918F /* JSDOMCoreException.cpp */,
     10581                                BC60D7BF0D29A46300B9918F /* JSDOMCoreException.h */,
    1058010582                                65DF31D809D1C122000BE325 /* JSAttr.cpp */,
    1058110583                                65DF31D909D1C123000BE325 /* JSAttr.h */,
     
    1061810620                                65DF31EF09D1CC60000BE325 /* JSText.cpp */,
    1061910621                                65DF31F009D1CC60000BE325 /* JSText.h */,
     10622                                65DF31ED09D1CC60000BE325 /* JSRange.cpp */,
     10623                                65DF31EE09D1CC60000BE325 /* JSRange.h */,
     10624                                D23CA55E0AB0EAB6005108A5 /* JSRangeException.cpp */,
     10625                                D23CA55C0AB0EAAE005108A5 /* JSRangeException.h */,
    1062010626                        );
    1062110627                        name = Core;
     
    1149711503                                E10B93C20B73C291003ED890 /* JSCustomXPathNSResolver.cpp */,
    1149811504                                E10B937B0B73C00A003ED890 /* JSCustomXPathNSResolver.h */,
    11499                                 BCD9C2680C17AA81005C90A2 /* JSDOMExceptionConstructor.cpp */,
    11500                                 BCD9C2690C17AA81005C90A2 /* JSDOMExceptionConstructor.h */,
    1150111505                                B25BE50E0D06B70800B524C6 /* JSEventTargetBase.cpp */,
    1150211506                                B25BE50F0D06B70800B524C6 /* JSEventTargetBase.h */,
     
    1166911673                        isa = PBXGroup;
    1167011674                        children = (
    11671                                 65DF31ED09D1CC60000BE325 /* JSRange.cpp */,
    11672                                 65DF31EE09D1CC60000BE325 /* JSRange.h */,
    11673                                 D23CA55E0AB0EAB6005108A5 /* JSRangeException.cpp */,
    11674                                 D23CA55C0AB0EAAE005108A5 /* JSRangeException.h */,
    1167511675                        );
    1167611676                        name = Ranges;
     
    1229212292                                A8185F3109765765005826D9 /* DocumentType.h */,
    1229312293                                93EEC1E809C2877700C515D1 /* DocumentType.idl */,
     12294                                BC60D8030D29A9E800B9918F /* DOMCoreException.cpp */,
     12295                                BC60D6E80D28D83400B9918F /* DOMCoreException.h */,
     12296                                BC60D6EB0D28D99900B9918F /* DOMCoreException.idl */,
    1229412297                                A8185F3609765765005826D9 /* DOMImplementation.cpp */,
    1229512298                                A8185F3309765765005826D9 /* DOMImplementation.h */,
     
    1348413487                                1A3417C90CECFF250049CBDE /* JSCustomVoidCallback.h in Headers */,
    1348513488                                E10B937C0B73C00A003ED890 /* JSCustomXPathNSResolver.h in Headers */,
    13486                                 BCD9C26F0C17AA81005C90A2 /* JSDOMExceptionConstructor.h in Headers */,
    1348713489                                BCD9C2C60C17B6EC005C90A2 /* JSDOMExceptionConstructor.lut.h in Headers */,
    1348813490                                65DF31F809D1CC60000BE325 /* JSDOMImplementation.h in Headers */,
     
    1427814280                                BC7FA6810D1F167900DB22A9 /* SelectorNodeList.h in Headers */,
    1427914281                                BCE3BEC30D222B1D007E06E4 /* TagNodeList.h in Headers */,
     14282                                BC60D6E90D28D83400B9918F /* DOMCoreException.h in Headers */,
     14283                                BC60D7C10D29A46300B9918F /* JSDOMCoreException.h in Headers */,
    1428014284                        );
    1428114285                        runOnlyForDeploymentPostprocessing = 0;
     
    1454314547                                B2A1F2AF0CEF0ABF00442F6A /* SVGGlyphElement.idl in Resources */,
    1454414548                                B2A1F2B20CEF0ABF00442F6A /* SVGMissingGlyphElement.idl in Resources */,
    14545                                 B27B28360CEF0C3600D39D54 /* CSSPropertyNames.in in Resources */,
    14546                                 B27B28370CEF0C3600D39D54 /* CSSValueKeywords.in in Resources */,
     14549                                BC60D6EC0D28D99900B9918F /* DOMCoreException.idl in Resources */,
    1454714550                        );
    1454814551                        runOnlyForDeploymentPostprocessing = 0;
     
    1521415217                                1A3417CA0CECFF250049CBDE /* JSCustomVoidCallback.cpp in Sources */,
    1521515218                                E10B93C30B73C291003ED890 /* JSCustomXPathNSResolver.cpp in Sources */,
    15216                                 BCD9C26E0C17AA81005C90A2 /* JSDOMExceptionConstructor.cpp in Sources */,
    1521715219                                65DF31F709D1CC60000BE325 /* JSDOMImplementation.cpp in Sources */,
    1521815220                                1ACE53DF0A8D18810022947D /* JSDOMParser.cpp in Sources */,
     
    1601516017                                BC7FA6820D1F167900DB22A9 /* SelectorNodeList.cpp in Sources */,
    1601616018                                BCE3BEC20D222B1D007E06E4 /* TagNodeList.cpp in Sources */,
     16019                                BC60D7C00D29A46300B9918F /* JSDOMCoreException.cpp in Sources */,
     16020                                BC60D8040D29A9E800B9918F /* DOMCoreException.cpp in Sources */,
    1601716021                        );
    1601816022                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebCore/bindings/js/kjs_binding.cpp

    r28527 r29058  
    2727#include "kjs_binding.h"
    2828
     29#include "DOMCoreException.h"
    2930#include "ExceptionCode.h"
    3031#include "HTMLImageElement.h"
    3132#include "HTMLNames.h"
     33#include "JSDOMCoreException.h"
    3234#include "JSNode.h"
    3335#include "XMLHttpRequest.h"
     
    267269    }
    268270
    269     ExceptionCodeDescription description;
    270     getExceptionCodeDescription(ec, description);
    271 
    272     // 100 characters is a big enough buffer, because there are:
    273     //   13 characters in the message
    274     //   10 characters in the longest type name
    275     //   27 characters in the longest exception name
    276     //   20 or so digits in the longest integer's ASCII form (even if int is 64-bit)
    277     //   1 byte for a null character
    278     // That adds up to about 70 bytes.
    279     char buffer[100];
    280     if (description.name)
    281         sprintf(buffer, "%s: %s Exception %d", description.name, description.typeName, description.code);
    282     else
    283         sprintf(buffer, "%s Exception %d", description.typeName, description.code);
    284 
    285     JSObject* errorObject = throwError(exec, GeneralError, buffer);
    286     errorObject->put(exec, "code", jsNumber(description.code));
    287 }
    288 
    289 }
     271    DOMCoreException* exception = new DOMCoreException(ec);
     272    JSValue* errorObject = toJS(exec, exception);
     273    exec->setException(errorObject);
     274}
     275
     276} // namespace KJS
  • trunk/WebCore/bindings/js/kjs_window.cpp

    r29044 r29058  
    4040#include "GCController.h"
    4141#include "HTMLDocument.h"
    42 #include "JSDOMExceptionConstructor.h"
    4342#include "JSDOMWindow.h"
    4443#include "JSEvent.h"
     
    195194# -- Constructors --
    196195  Audio                 Window::Audio               DontDelete
    197   DOMException          Window::DOMException        DontDelete
    198196  Image                 Window::Image               DontDelete
    199197  Option                Window::Option              DontDelete
     
    461459   case Crypto:
    462460      return jsUndefined(); // FIXME: implement this
    463    case DOMException:
    464       if (!allowsAccessFrom(exec))
    465         return jsUndefined();
    466       return getDOMExceptionConstructor(exec);
    467461    case Event_:
    468462      if (!allowsAccessFrom(exec))
  • trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r28858 r29058  
    134134}
    135135
     136sub GetVisibleClassName
     137{
     138    my $className = shift;
     139
     140    return "DOMException" if $className eq "DOMCoreException";
     141    return $className;
     142}
     143
    136144sub AvoidInclusionOfType
    137145{
     
    564572    my $parentClassName = GetParentClassName($dataNode);
    565573    my $conditional = $dataNode->extendedAttributes->{"Conditional"};
     574    my $visibleClassName = GetVisibleClassName($interfaceName);
    566575
    567576    # - Add default header template
     
    675684        $protoClassName = "${className}Prototype";
    676685
    677         push(@implContent, constructorFor($className, $protoClassName, $interfaceName, $dataNode->extendedAttributes->{"CanBeConstructed"}));
     686        push(@implContent, constructorFor($className, $protoClassName, $interfaceName, $visibleClassName, $dataNode->extendedAttributes->{"CanBeConstructed"}));
    678687    }
    679688
     
    723732                               \@hashSpecials, \@hashParameters);
    724733
    725     push(@implContent, "const ClassInfo ${className}Prototype::info = { \"${interfaceName}Prototype\", 0, &${className}PrototypeTable };\n\n");
     734    push(@implContent, "const ClassInfo ${className}Prototype::info = { \"${visibleClassName}Prototype\", 0, &${className}PrototypeTable };\n\n");
    726735    if ($dataNode->extendedAttributes->{"DoNotCache"}) {
    727736        push(@implContent, "JSObject* ${className}Prototype::self()\n");
     
    754763
    755764    # - Initialize static ClassInfo object
    756     push(@implContent, "const ClassInfo $className" . "::info = { \"$interfaceName\", ");
     765    push(@implContent, "const ClassInfo $className" . "::info = { \"${visibleClassName}\", ");
    757766    if ($hasParent) {
    758767        push(@implContent, "&" .$parentClassName . "::info, ");
     
    17351744    my $protoClassName = shift;
    17361745    my $interfaceName = shift;
     1746    my $visibleClassName = shift;
    17371747    my $canConstruct = shift;
    17381748
     
    17631773};
    17641774
    1765 const ClassInfo ${className}Constructor::info = { "${interfaceName}Constructor", 0, &${className}ConstructorTable };
     1775const ClassInfo ${className}Constructor::info = { "${visibleClassName}Constructor", 0, &${className}ConstructorTable };
    17661776
    17671777bool ${className}Constructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
  • trunk/WebCore/page/DOMWindow.idl

    r29051 r29058  
    154154
    155155        // FIXME: Implement the commented-out global constructors for interfaces listed in DOM Level 3 Core specification.
    156 //        attribute DOMExceptionConstructor DOMException;
     156        attribute DOMCoreExceptionConstructor DOMException;
    157157//        attribute DOMStringListConstructor DOMStringList;
    158158//        attribute NameListConstructor NameList;
Note: See TracChangeset for help on using the changeset viewer.