Bug 85100

Summary: WebKit IDL does not use exception syntax
Product: WebKit Reporter: Erik Arvidsson <arv>
Component: DOMAssignee: Erik Arvidsson <arv>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, ap, darin, dglazkov, haraken, japhet, ojan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://www.w3.org/TR/WebIDL/#idl-exceptions
Bug Depends on: 85078    
Bug Blocks:    
Attachments:
Description Flags
Patch dglazkov: review+

Description Erik Arvidsson 2012-04-27 14:30:01 PDT
WebIDL defines a special syntax for exception interfaces.

http://www.w3.org/TR/WebIDL/#idl-exceptions

which looks like

exception Name { ... }

We currently do not have a special syntax for this and we just use interface. For example, our interface for DOMException looks like this:

interface DOMException { ... }

http://trac.webkit.org/browser/trunk/Source/WebCore/dom/DOMCoreException.idl

when it should look like this

exception DOMException { ... }

http://www.w3.org/TR/dom/#exception-domexception
Comment 1 Erik Arvidsson 2012-04-27 16:19:02 PDT
Created attachment 139300 [details]
Patch
Comment 2 WebKit Review Bot 2012-04-27 16:22:54 PDT
Attachment 139300 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/bindings/scripts/test/ObjC/DOMTestExceptionInternal.h:32:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Source/WebCore/bindings/scripts/test/CPP/WebDOMTestException.cpp:28:  wtf includes should be <wtf/file.h> instead of "wtf/file.h".  [build/include] [4]
Source/WebCore/bindings/scripts/test/JS/JSTestException.h:58:  More than one command on the same line in if  [whitespace/parens] [4]
Total errors found: 3 in 26 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Dimitri Glazkov (Google) 2012-05-04 14:01:37 PDT
Comment on attachment 139300 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=139300&action=review

> Source/WebCore/ChangeLog:8
> +        This add support for exception ExceptionName { ... } which currently sets a flag

add -> adds
Comment 4 Erik Arvidsson 2012-05-04 14:22:26 PDT
Committed r116172: <http://trac.webkit.org/changeset/116172>
Comment 5 Erik Arvidsson 2012-05-04 14:29:36 PDT
(In reply to comment #3)
> (From update of attachment 139300 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=139300&action=review
> 
> > Source/WebCore/ChangeLog:8
> > +        This add support for exception ExceptionName { ... } which currently sets a flag
> 
> add -> adds

Sorry, this typo slipped through the rebase dance.
Comment 6 Dimitri Glazkov (Google) 2012-05-04 14:30:28 PDT
(In reply to comment #5)
> (In reply to comment #3)
> > (From update of attachment 139300 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=139300&action=review
> > 
> > > Source/WebCore/ChangeLog:8
> > > +        This add support for exception ExceptionName { ... } which currently sets a flag
> > 
> > add -> adds
> 
> Sorry, this typo slipped through the rebase dance.

insanity wolf!!!