Title: [151378] trunk/Source/WebCore
Revision
151378
Author
[email protected]
Date
2013-06-10 04:05:43 -0700 (Mon, 10 Jun 2013)

Log Message

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 <[email protected]>.

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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (151377 => 151378)


--- trunk/Source/WebCore/ChangeLog	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/ChangeLog	2013-06-10 11:05:43 UTC (rev 151378)
@@ -1,3 +1,39 @@
+2013-06-10  Christophe Dumez  <[email protected]>
+
+        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 <[email protected]>.
+
+        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  <[email protected]>
 
         Web Inspector: refactor statusBarItems getter in front-end.

Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.idl (151377 => 151378)


--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -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);
 

Modified: trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl (151377 => 151378)


--- trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -31,7 +31,7 @@
 [
     Conditional=MEDIA_STREAM,
     Constructor(Dictionary dictionary),
-    ConstructorRaisesException
+    RaisesException
 ] interface RTCIceCandidate {
     readonly attribute DOMString candidate;
     readonly attribute DOMString sdpMid;

Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl (151377 => 151378)


--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -32,7 +32,7 @@
     Conditional=MEDIA_STREAM,
     ActiveDOMObject,
     Constructor(Dictionary rtcIceServers, optional Dictionary mediaConstraints),
-    ConstructorRaisesException,
+    RaisesException,
     CallWith=ScriptExecutionContext,
     EventTarget,
     InterfaceName=webkitRTCPeerConnection

Modified: trunk/Source/WebCore/Modules/mediastream/RTCSessionDescription.idl (151377 => 151378)


--- trunk/Source/WebCore/Modules/mediastream/RTCSessionDescription.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/Modules/mediastream/RTCSessionDescription.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -31,7 +31,7 @@
 [
     Conditional=MEDIA_STREAM,
     Constructor(Dictionary dictionary),
-    ConstructorRaisesException
+    RaisesException
 ] interface RTCSessionDescription {
     [SetterRaisesException] attribute DOMString type;
     [SetterRaisesException] attribute DOMString sdp;

Modified: trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.idl (151377 => 151378)


--- trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/Modules/webaudio/OfflineAudioContext.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -27,7 +27,7 @@
     EventTarget,
     JSGenerateToJSObject,
     Constructor(unsigned long numberOfChannels, unsigned long numberOfFrames, float sampleRate),
-    ConstructorRaisesException,
+    RaisesException,
     CallWith=ScriptExecutionContext,
     InterfaceName=webkitOfflineAudioContext
 ] interface OfflineAudioContext : AudioContext {

Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.idl (151377 => 151378)


--- trunk/Source/WebCore/Modules/websockets/WebSocket.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -37,7 +37,7 @@
     Constructor(DOMString url),
     Constructor(DOMString url, sequence<DOMString> protocols),
     Constructor(DOMString url, DOMString protocol),
-    ConstructorRaisesException,
+    RaisesException,
     CallWith=ScriptExecutionContext,
     EventTarget,
     JSNoStaticTables,

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (151377 => 151378)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2013-06-10 11:05:43 UTC (rev 151378)
@@ -4134,7 +4134,7 @@
 
             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 @@
                 $index++;
             }
 
-            if ($interface->extendedAttributes->{"ConstructorRaisesException"}) {
+            if ($interface->extendedAttributes->{"RaisesException"}) {
                 push(@constructorArgList, "ec");
             }
             my $constructorArg = join(", ", @constructorArgList);
@@ -4171,7 +4171,7 @@
                 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");

Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (151377 => 151378)


--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt	2013-06-10 11:05:43 UTC (rev 151378)
@@ -28,7 +28,6 @@
 Conditional=*
 Constructor
 ConstructorConditional=*
-ConstructorRaisesException
 ConstructorTemplate=Event|TypedArray
 Custom
 CustomCall

Modified: trunk/Source/WebCore/bindings/scripts/test/TestInterface.idl (151377 => 151378)


--- trunk/Source/WebCore/bindings/scripts/test/TestInterface.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/bindings/scripts/test/TestInterface.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -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 {

Modified: trunk/Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl (151377 => 151378)


--- trunk/Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -31,6 +31,6 @@
 [
     ActiveDOMObject,
     NamedConstructor=Audio(DOMString str1, [Default=Undefined] optional DOMString str2, [Default=NullString] optional DOMString str3),
-    ConstructorRaisesException
+    RaisesException
 ] interface TestNamedConstructor {
 };

Modified: trunk/Source/WebCore/css/WebKitCSSMatrix.idl (151377 => 151378)


--- trunk/Source/WebCore/css/WebKitCSSMatrix.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/css/WebKitCSSMatrix.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -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

Modified: trunk/Source/WebCore/html/HTMLOptionElement.idl (151377 => 151378)


--- trunk/Source/WebCore/html/HTMLOptionElement.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/html/HTMLOptionElement.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -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;

Modified: trunk/Source/WebCore/page/EventSource.idl (151377 => 151378)


--- trunk/Source/WebCore/page/EventSource.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/page/EventSource.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -34,7 +34,7 @@
     ActiveDOMObject,
     Constructor(DOMString url, optional Dictionary eventSourceInit),
     CallWith=ScriptExecutionContext,
-    ConstructorRaisesException,
+    RaisesException,
     EventTarget,
     JSNoStaticTables
 ] interface EventSource {

Modified: trunk/Source/WebCore/workers/SharedWorker.idl (151377 => 151378)


--- trunk/Source/WebCore/workers/SharedWorker.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/workers/SharedWorker.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -34,7 +34,7 @@
     Conditional=SHARED_WORKERS,
     CustomConstructor(DOMString scriptURL, [Default=NullString] optional DOMString name),
     CallWith=ScriptExecutionContext,
-    ConstructorRaisesException,
+    RaisesException,
     JSCustomMarkFunction,
     JSGenerateToNativeObject,
     JSGenerateToJSObject

Modified: trunk/Source/WebCore/workers/Worker.idl (151377 => 151378)


--- trunk/Source/WebCore/workers/Worker.idl	2013-06-10 10:44:21 UTC (rev 151377)
+++ trunk/Source/WebCore/workers/Worker.idl	2013-06-10 11:05:43 UTC (rev 151378)
@@ -29,7 +29,7 @@
     Conditional=WORKERS,
     CustomConstructor(DOMString scriptUrl),
     CallWith=ScriptExecutionContext,
-    ConstructorRaisesException,
+    RaisesException,
     JSGenerateToNativeObject,
     JSGenerateToJSObject
 ] interface Worker : AbstractWorker {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to