Replace [ConstructorRaisesException] with [RaisesException]
authorch.dumez@sisa.samsung.com <ch.dumez@sisa.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Jun 2013 11:05:43 +0000 (11:05 +0000)
committerch.dumez@sisa.samsung.com <ch.dumez@sisa.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Jun 2013 11:05:43 +0000 (11:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=117400

Reviewed by Kentaro Hara.

Replace [ConstructorRaisesException] with [RaisesException] IDL extended
attribute and drop [ConstructorRaisesException]. It makes little sense
to have 2 extended attributes with the same meaning.

[RaisesException] can now be used on IDL operations to indicate that the
method may throw exceptions or on interfaces to indicate that the
constructor may throw exceptions.

From Blink r148027 by Kentaro Hara <haraken@chromium.org>.

No new tests, no behavior change.

* Modules/encryptedmedia/MediaKeys.idl:
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestNamedConstructor.idl:
* css/WebKitCSSMatrix.idl:
* html/HTMLOptionElement.idl:
* page/EventSource.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151378 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/MediaKeys.idl
Source/WebCore/Modules/mediastream/RTCIceCandidate.idl
Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
Source/WebCore/Modules/mediastream/RTCSessionDescription.idl
Source/WebCore/Modules/webaudio/OfflineAudioContext.idl
Source/WebCore/Modules/websockets/WebSocket.idl
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/IDLAttributes.txt
Source/WebCore/bindings/scripts/test/TestInterface.idl
Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl
Source/WebCore/css/WebKitCSSMatrix.idl
Source/WebCore/html/HTMLOptionElement.idl
Source/WebCore/page/EventSource.idl
Source/WebCore/workers/SharedWorker.idl
Source/WebCore/workers/Worker.idl

index ecf0f04..ea27dbf 100644 (file)
@@ -1,3 +1,39 @@
+2013-06-10  Christophe Dumez  <ch.dumez@sisa.samsung.com>
+
+        Replace [ConstructorRaisesException] with [RaisesException]
+        https://bugs.webkit.org/show_bug.cgi?id=117400
+
+        Reviewed by Kentaro Hara.
+
+        Replace [ConstructorRaisesException] with [RaisesException] IDL extended
+        attribute and drop [ConstructorRaisesException]. It makes little sense
+        to have 2 extended attributes with the same meaning.
+
+        [RaisesException] can now be used on IDL operations to indicate that the
+        method may throw exceptions or on interfaces to indicate that the
+        constructor may throw exceptions.
+
+        From Blink r148027 by Kentaro Hara <haraken@chromium.org>.
+
+        No new tests, no behavior change.
+
+        * Modules/encryptedmedia/MediaKeys.idl:
+        * Modules/mediastream/RTCIceCandidate.idl:
+        * Modules/mediastream/RTCPeerConnection.idl:
+        * Modules/mediastream/RTCSessionDescription.idl:
+        * Modules/webaudio/OfflineAudioContext.idl:
+        * Modules/websockets/WebSocket.idl:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateConstructorDefinition):
+        * bindings/scripts/IDLAttributes.txt:
+        * bindings/scripts/test/TestInterface.idl:
+        * bindings/scripts/test/TestNamedConstructor.idl:
+        * css/WebKitCSSMatrix.idl:
+        * html/HTMLOptionElement.idl:
+        * page/EventSource.idl:
+        * workers/SharedWorker.idl:
+        * workers/Worker.idl:
+
 2013-06-10  Mátyás Mustoha  <mmatyas@inf.u-szeged.hu>
 
         Web Inspector: refactor statusBarItems getter in front-end.
index 6427aba..ad9ef1e 100644 (file)
@@ -26,7 +26,7 @@
 [
     Conditional=ENCRYPTED_MEDIA_V2,
     Constructor(DOMString keySystem),
-    ConstructorRaisesException,
+    RaisesException,
 ] interface MediaKeys {
     [CallWith=ScriptExecutionContext, RaisesException] MediaKeySession createSession([Default=Undefined] optional DOMString type, [Default=Undefined] optional Uint8Array initData);
 
index 2ca14e5..9cba455 100644 (file)
@@ -31,7 +31,7 @@
 [
     Conditional=MEDIA_STREAM,
     Constructor(Dictionary dictionary),
-    ConstructorRaisesException
+    RaisesException
 ] interface RTCIceCandidate {
     readonly attribute DOMString candidate;
     readonly attribute DOMString sdpMid;
index 9021af5..0997b0d 100644 (file)
@@ -32,7 +32,7 @@
     Conditional=MEDIA_STREAM,
     ActiveDOMObject,
     Constructor(Dictionary rtcIceServers, optional Dictionary mediaConstraints),
-    ConstructorRaisesException,
+    RaisesException,
     CallWith=ScriptExecutionContext,
     EventTarget,
     InterfaceName=webkitRTCPeerConnection
index b51746c..5802e0b 100644 (file)
@@ -31,7 +31,7 @@
 [
     Conditional=MEDIA_STREAM,
     Constructor(Dictionary dictionary),
-    ConstructorRaisesException
+    RaisesException
 ] interface RTCSessionDescription {
     [SetterRaisesException] attribute DOMString type;
     [SetterRaisesException] attribute DOMString sdp;
index ebf0cdb..b34049b 100644 (file)
@@ -27,7 +27,7 @@
     EventTarget,
     JSGenerateToJSObject,
     Constructor(unsigned long numberOfChannels, unsigned long numberOfFrames, float sampleRate),
-    ConstructorRaisesException,
+    RaisesException,
     CallWith=ScriptExecutionContext,
     InterfaceName=webkitOfflineAudioContext
 ] interface OfflineAudioContext : AudioContext {
index 8d2b721..cd85746 100644 (file)
@@ -37,7 +37,7 @@
     Constructor(DOMString url),
     Constructor(DOMString url, sequence<DOMString> protocols),
     Constructor(DOMString url, DOMString protocol),
-    ConstructorRaisesException,
+    RaisesException,
     CallWith=ScriptExecutionContext,
     EventTarget,
     JSNoStaticTables,
index 3e18583..e2d9365 100644 (file)
@@ -4134,7 +4134,7 @@ END
 
             GenerateArgumentsCountCheck($outputArray, $function, $interface);
 
-            if ($function->signature->extendedAttributes->{"RaisesException"} || $interface->extendedAttributes->{"ConstructorRaisesException"}) {
+            if ($function->signature->extendedAttributes->{"RaisesException"} || $interface->extendedAttributes->{"RaisesException"}) {
                 $implIncludes{"ExceptionCode.h"} = 1;
                 push(@$outputArray, "    ExceptionCode ec = 0;\n");
             }
@@ -4161,7 +4161,7 @@ END
                 $index++;
             }
 
-            if ($interface->extendedAttributes->{"ConstructorRaisesException"}) {
+            if ($interface->extendedAttributes->{"RaisesException"}) {
                 push(@constructorArgList, "ec");
             }
             my $constructorArg = join(", ", @constructorArgList);
@@ -4171,7 +4171,7 @@ END
                 push(@$outputArray, "    RefPtr<${interfaceName}> object = ${interfaceName}::create(${constructorArg});\n");
             }
 
-            if ($interface->extendedAttributes->{"ConstructorRaisesException"}) {
+            if ($interface->extendedAttributes->{"RaisesException"}) {
                 push(@$outputArray, "    if (ec) {\n");
                 push(@$outputArray, "        setDOMException(exec, ec);\n");
                 push(@$outputArray, "        return JSValue::encode(JSValue());\n");
index c036916..a0b9b7e 100644 (file)
@@ -28,7 +28,6 @@ Clamp
 Conditional=*
 Constructor
 ConstructorConditional=*
-ConstructorRaisesException
 ConstructorTemplate=Event|TypedArray
 Custom
 CustomCall
index ae4dbd0..28fa2bc 100644 (file)
@@ -34,7 +34,7 @@
     Conditional=Condition1|Condition2,
     CallWith=ScriptExecutionContext,
     Constructor(DOMString str1, [Default=Undefined] optional DOMString str2),
-    ConstructorRaisesException,
+    RaisesException,
     ConstructorConditional=TEST_INTERFACE,
     ImplementationLacksVTable
 ] interface TestInterface {
index d47c503..95777f6 100644 (file)
@@ -31,6 +31,6 @@
 [
     ActiveDOMObject,
     NamedConstructor=Audio(DOMString str1, [Default=Undefined] optional DOMString str2, [Default=NullString] optional DOMString str3),
-    ConstructorRaisesException
+    RaisesException
 ] interface TestNamedConstructor {
 };
index 9b602a8..e89d2ae 100644 (file)
@@ -26,7 +26,7 @@
 // Introduced in DOM Level ?:
 [
     Constructor([Default=NullString] optional DOMString cssValue),
-    ConstructorRaisesException,
+    RaisesException,
 ] interface WebKitCSSMatrix {
 
     // These attributes are simple aliases for certain elements of the 4x4 matrix
index eeafa42..22758c1 100644 (file)
@@ -21,7 +21,7 @@
 [
     JSGenerateToNativeObject,
     NamedConstructor=Option([Default=NullString] optional DOMString data, [Default=NullString] optional DOMString value, [Default=Undefined] optional boolean defaultSelected, [Default=Undefined] optional boolean selected),
-    ConstructorRaisesException
+    RaisesException
 ] interface HTMLOptionElement : HTMLElement {
     [Reflect] attribute boolean disabled;
     readonly attribute HTMLFormElement form;
index 185f4fd..40aa7a8 100644 (file)
@@ -34,7 +34,7 @@
     ActiveDOMObject,
     Constructor(DOMString url, optional Dictionary eventSourceInit),
     CallWith=ScriptExecutionContext,
-    ConstructorRaisesException,
+    RaisesException,
     EventTarget,
     JSNoStaticTables
 ] interface EventSource {
index 07ece45..f5e015c 100644 (file)
@@ -34,7 +34,7 @@
     Conditional=SHARED_WORKERS,
     CustomConstructor(DOMString scriptURL, [Default=NullString] optional DOMString name),
     CallWith=ScriptExecutionContext,
-    ConstructorRaisesException,
+    RaisesException,
     JSCustomMarkFunction,
     JSGenerateToNativeObject,
     JSGenerateToJSObject
index 136dab5..55cabdc 100644 (file)
@@ -29,7 +29,7 @@
     Conditional=WORKERS,
     CustomConstructor(DOMString scriptUrl),
     CallWith=ScriptExecutionContext,
-    ConstructorRaisesException,
+    RaisesException,
     JSGenerateToNativeObject,
     JSGenerateToJSObject
 ] interface Worker : AbstractWorker {