Changeset 116172 in webkit
- Timestamp:
- May 4, 2012 2:23:15 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 12 added
- 13 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116171 r116172 1 2012-04-27 Erik Arvidsson <arv@chromium.org> 2 3 WebKit IDL does not use exception syntax 4 https://bugs.webkit.org/show_bug.cgi?id=85100 5 6 Reviewed by Dimitri Glazkov. 7 8 This adds support for exception ExceptionName { ... } which currently sets a flag 9 on the domClass. 10 11 Binding tests updated. 12 13 * Modules/indexeddb/IDBDatabaseException.idl: 14 * Modules/webdatabase/SQLException.idl: 15 * bindings/scripts/IDLParser.pm: 16 (ParseInterface): 17 (DetermineParseMode): 18 (ProcessSection): 19 * bindings/scripts/IDLStructure.pm: 20 * bindings/scripts/test/CPP/WebDOMTestException.cpp: Added. 21 (WebDOMTestException::WebDOMTestExceptionPrivate::WebDOMTestExceptionPrivate): 22 (WebDOMTestException::WebDOMTestExceptionPrivate): 23 (WebDOMTestException::WebDOMTestException): 24 (WebDOMTestException::operator=): 25 (WebDOMTestException::impl): 26 (WebDOMTestException::~WebDOMTestException): 27 (WebDOMTestException::name): 28 (toWebCore): 29 (toWebKit): 30 * bindings/scripts/test/CPP/WebDOMTestException.h: Added. 31 (WebCore): 32 (WebDOMTestException): 33 * bindings/scripts/test/GObject/WebKitDOMTestException.cpp: Added. 34 (WebKit): 35 (WebKit::kit): 36 (WebKit::core): 37 (WebKit::wrapTestException): 38 (webkit_dom_test_exception_finalize): 39 (webkit_dom_test_exception_set_property): 40 (webkit_dom_test_exception_get_property): 41 (webkit_dom_test_exception_constructed): 42 (webkit_dom_test_exception_class_init): 43 (webkit_dom_test_exception_init): 44 (webkit_dom_test_exception_get_name): 45 * bindings/scripts/test/GObject/WebKitDOMTestException.h: Added. 46 (_WebKitDOMTestException): 47 (_WebKitDOMTestExceptionClass): 48 * bindings/scripts/test/GObject/WebKitDOMTestExceptionPrivate.h: Added. 49 (WebKit): 50 * bindings/scripts/test/JS/JSTestException.cpp: Added. 51 (WebCore): 52 (WebCore::JSTestExceptionConstructor::JSTestExceptionConstructor): 53 (WebCore::JSTestExceptionConstructor::finishCreation): 54 (WebCore::JSTestExceptionConstructor::getOwnPropertySlot): 55 (WebCore::JSTestExceptionConstructor::getOwnPropertyDescriptor): 56 (WebCore::JSTestExceptionPrototype::self): 57 (WebCore::JSTestException::JSTestException): 58 (WebCore::JSTestException::finishCreation): 59 (WebCore::JSTestException::createPrototype): 60 (WebCore::JSTestException::destroy): 61 (WebCore::JSTestException::~JSTestException): 62 (WebCore::JSTestException::getOwnPropertySlot): 63 (WebCore::JSTestException::getOwnPropertyDescriptor): 64 (WebCore::jsTestExceptionName): 65 (WebCore::jsTestExceptionConstructor): 66 (WebCore::JSTestException::getConstructor): 67 (WebCore::isObservable): 68 (WebCore::JSTestExceptionOwner::isReachableFromOpaqueRoots): 69 (WebCore::JSTestExceptionOwner::finalize): 70 (WebCore::toJS): 71 (WebCore::toTestException): 72 * bindings/scripts/test/JS/JSTestException.h: Added. 73 (WebCore): 74 (JSTestException): 75 (WebCore::JSTestException::create): 76 (WebCore::JSTestException::createStructure): 77 (WebCore::JSTestException::impl): 78 (WebCore::JSTestException::releaseImpl): 79 (WebCore::JSTestException::releaseImplIfNotNull): 80 (JSTestExceptionOwner): 81 (WebCore::wrapperOwner): 82 (WebCore::wrapperContext): 83 (JSTestExceptionPrototype): 84 (WebCore::JSTestExceptionPrototype::create): 85 (WebCore::JSTestExceptionPrototype::createStructure): 86 (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype): 87 (JSTestExceptionConstructor): 88 (WebCore::JSTestExceptionConstructor::create): 89 (WebCore::JSTestExceptionConstructor::createStructure): 90 * bindings/scripts/test/ObjC/DOMTestException.h: Added. 91 * bindings/scripts/test/ObjC/DOMTestException.mm: Added. 92 (-[DOMTestException dealloc]): 93 (-[DOMTestException finalize]): 94 (-[DOMTestException name]): 95 (core): 96 (kit): 97 * bindings/scripts/test/ObjC/DOMTestExceptionInternal.h: Added. 98 (WebCore): 99 * bindings/scripts/test/TestException.idl: Copied from Source/WebCore/xml/XPathException.idl. 100 * bindings/scripts/test/V8/V8TestException.cpp: Added. 101 (WebCore): 102 (TestExceptionV8Internal): 103 (WebCore::TestExceptionV8Internal::V8_USE): 104 (WebCore::TestExceptionV8Internal::nameAttrGetter): 105 (WebCore::ConfigureV8TestExceptionTemplate): 106 (WebCore::V8TestException::GetRawTemplate): 107 (WebCore::V8TestException::GetTemplate): 108 (WebCore::V8TestException::HasInstance): 109 (WebCore::V8TestException::wrapSlow): 110 (WebCore::V8TestException::derefObject): 111 * bindings/scripts/test/V8/V8TestException.h: Added. 112 (WebCore): 113 (V8TestException): 114 (WebCore::V8TestException::toNative): 115 (WebCore::V8TestException::wrap): 116 (WebCore::toV8): 117 * dom/DOMCoreException.idl: 118 * dom/EventException.idl: 119 * dom/RangeException.idl: 120 * fileapi/FileException.idl: 121 * fileapi/OperationNotAllowedException.idl: 122 * svg/SVGException.idl: 123 * xml/XMLHttpRequestException.idl: 124 * xml/XPathException.idl: 125 1 126 2012-05-04 Rafael Weinstein <rafaelw@chromium.org> 2 127 -
trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseException.idl
r109493 r116172 26 26 module storage { 27 27 28 interface[28 exception [ 29 29 Conditional=INDEXED_DATABASE, 30 30 DoNotCheckConstants -
trunk/Source/WebCore/Modules/webdatabase/SQLException.idl
r109877 r116172 31 31 module storage { 32 32 33 interface[33 exception [ 34 34 Conditional=SQL_DATABASE, 35 35 JSNoStaticTables, -
trunk/Source/WebCore/bindings/scripts/IDLParser.pm
r109210 r116172 33 33 use constant MODE_MODULE => 10; # 'module' section 34 34 use constant MODE_INTERFACE => 11; # 'interface' section 35 use constant MODE_EXCEPTION => 12; # 'exception' section 35 36 36 37 # Helper variables … … 275 276 276 277 # Beginning of the regexp parsing magic 277 if ($sectionName eq "interface" ) {278 if ($sectionName eq "interface" || $sectionName eq "exception") { 278 279 print " |- Trying to parse interface...\n" unless $beQuiet; 279 280 … … 284 285 $data =~ /$IDLStructure::interfaceSelector/; 285 286 286 my $interfaceExtendedAttributes = (defined($1) ? $1 : " "); chop($interfaceExtendedAttributes); 287 $interfaceName = (defined($2) ? $2 : die("Parsing error!\nSource:\n$data\n)")); 288 my $interfaceBase = (defined($3) ? $3 : ""); 289 $interfaceData = (defined($4) ? $4 : die("Parsing error!\nSource:\n$data\n)")); 287 my $isException = (defined($1) ? ($1 eq 'exception') : die("Parsing error!\nSource:\n$data\n)")); 288 my $interfaceExtendedAttributes = (defined($2) ? $2 : " "); chop($interfaceExtendedAttributes); 289 $interfaceName = (defined($3) ? $3 : die("Parsing error!\nSource:\n$data\n)")); 290 my $interfaceBase = (defined($4) ? $4 : ""); 291 $interfaceData = (defined($5) ? $5 : die("Parsing error!\nSource:\n$data\n)")); 290 292 291 293 # Fill in known parts of the domClass datastructure now... 294 $dataNode->isException($isException); 292 295 $dataNode->name($interfaceName); 293 296 my $extendedAttributes = parseExtendedAttributes($interfaceExtendedAttributes); … … 431 434 } elsif ($_ =~ /interface/) { 432 435 $mode = MODE_INTERFACE; 436 } elsif ($_ =~ /exception/) { 437 $mode = MODE_EXCEPTION; 433 438 } 434 439 … … 445 450 $document = new idlDocument(); 446 451 $object->ParseModule($document); 447 } elsif ($parseMode eq MODE_INTERFACE ) {452 } elsif ($parseMode eq MODE_INTERFACE || $parseMode eq MODE_EXCEPTION) { 448 453 my $node = new domClass(); 449 $object->ParseInterface($node, "interface"); 454 my $sectionName = $parseMode eq MODE_INTERFACE ? "interface" : "exception"; 455 $object->ParseInterface($node, $sectionName); 450 456 451 457 die ("No module specified! Fatal Error!\n") if ($document eq 0); -
trunk/Source/WebCore/bindings/scripts/IDLStructure.pm
r114887 r116172 42 42 extendedAttributes => '$', # Extended attributes 43 43 constructor => '$', # Constructor 44 isException => '$', # Used for exception interfaces 44 45 }); 45 46 … … 104 105 our $typeNamespaceSelector = '((?:' . $idlId . '*::)*)\s*(' . $idlDataType . '*)'; 105 106 106 our $interfaceSelector = ' interface\s*((?:' . $extendedAttributeSyntax . ' )?)(' . $idlIdNs . '*)\s*(?::(\s*[^{]*))?{([-a-zA-Z0-9_"=\s(),;:\[\]<>&\|]*)';107 our $interfaceSelector = '(interface|exception)\s*((?:' . $extendedAttributeSyntax . ' )?)(' . $idlIdNs . '*)\s*(?::(\s*[^{]*))?{([-a-zA-Z0-9_"=\s(),;:\[\]<>&\|]*)'; 107 108 our $interfaceMethodSelector = '\s*((?:' . $extendedAttributeSyntax . ' )?)(static\s+)?' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,=\[\]<>]*)'; 108 109 our $interfaceParameterSelector = '(in|out)\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)'; -
trunk/Source/WebCore/bindings/scripts/test/TestException.idl
r116171 r116172 1 1 /* 2 * Copyright (C) 20 07 Apple Inc. All rights reserved.2 * Copyright (C) 2012 Google Inc. All rights reserved. 3 3 * 4 * Redistribution and use in source and binary forms , with or without4 * Redistribution and use in source and binary formstrArg, with or without 5 5 * modification, are permitted provided that the following conditions 6 6 * are met: … … 16 16 * 17 17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 18 * EXPRESS OR IMPLIED WARRANTIE S, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED18 * EXPRESS OR IMPLIED WARRANTIEstrArg, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY … … 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 29 module xpath { 30 31 interface [ 32 DoNotCheckConstants 33 ] XPathException { 34 35 readonly attribute unsigned short code; 36 readonly attribute DOMString name; 37 readonly attribute DOMString message; 38 39 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT 40 // Override in a Mozilla compatible format 41 [NotEnumerable] DOMString toString(); 42 #endif 43 44 // XPathExceptionCode 45 const unsigned short INVALID_EXPRESSION_ERR = 51; 46 const unsigned short TYPE_ERR = 52; 28 module test { 29 exception TestException { 30 readonly attribute DOMString name; 47 31 }; 48 49 32 } -
trunk/Source/WebCore/dom/DOMCoreException.idl
r108669 r116172 29 29 module core { 30 30 31 interface[31 exception [ 32 32 JSNoStaticTables, 33 33 DoNotCheckConstants, -
trunk/Source/WebCore/dom/EventException.idl
r106892 r116172 30 30 31 31 // Introduced in DOM Level 2: 32 interface[32 exception [ 33 33 JSNoStaticTables, 34 34 DoNotCheckConstants -
trunk/Source/WebCore/dom/RangeException.idl
r106892 r116172 20 20 module ranges { 21 21 22 interface[22 exception [ 23 23 DoNotCheckConstants 24 24 ] RangeException { -
trunk/Source/WebCore/fileapi/FileException.idl
r106892 r116172 30 30 31 31 module html { 32 interface[32 exception [ 33 33 Conditional=BLOB|FILE_SYSTEM, 34 34 DoNotCheckConstants, -
trunk/Source/WebCore/fileapi/OperationNotAllowedException.idl
r111074 r116172 30 30 31 31 module html { 32 interface[32 exception [ 33 33 Conditional=BLOB, 34 34 DoNotCheckConstants, -
trunk/Source/WebCore/svg/SVGException.idl
r106892 r116172 21 21 module svg { 22 22 23 interface[23 exception [ 24 24 Conditional=SVG, 25 25 DoNotCheckConstants -
trunk/Source/WebCore/xml/XMLHttpRequestException.idl
r106892 r116172 29 29 module xml { 30 30 31 interface[31 exception [ 32 32 JSNoStaticTables, 33 33 DoNotCheckConstants -
trunk/Source/WebCore/xml/XPathException.idl
r106892 r116172 29 29 module xpath { 30 30 31 interface[31 exception [ 32 32 DoNotCheckConstants 33 33 ] XPathException {
Note: See TracChangeset
for help on using the changeset viewer.